Four Malaysian men have been detained by immigration authorities for overstaying, after one of them was badly injured in a car rollover in outback Western Australia.

Police were alerted to the crash in the early hours of Monday morning on the North West Coastal Highway, where a Malaysian suffered serious head injuries, the Australian Associated Press reported.

As he was being treated, three Malaysians in another car not involved in the crash were spotted acting suspiciously.

The Department of Immigration and Citizenship (DIAC) confirmed the three men were found to have overstayed their visas, and were taken into immigration detention.

The injured man who was flown to Perth for treatment, has also overstayed.

DIAC said he would also be taken into immigration detention once his medical treatment had concluded.

- Bernama