Man charged over car crash that killed his friend in Sydney

A man has been charged over a car crash which killed his friend on Sydney's M4 on Thursday morning.

Josh Bartley, 22, has been charged with dangerous driving causing death, after the car slammed into a highway crash barrier and flipped at Eastern Creek.

Joseph Yarak died at the scene, while the driver and three other passengers were taken to Westmead Hospital with non-life threatening injuries.

The driver then underwent mandatory blood and urine tests.

Joseph Yarak, 21, was killed in the crash. Source: 7 News

"Officers from the Metropolitan Crash Investigation Unit began investigations into the circumstances surrounding the crash," NSW Police said in a statement.

The driver has been refused bail and is due to appear at Parramatta Local Court on Friday.