A disgruntled taxi passenger who allegedly tried to shoot a taxi driver in Pietermaritzburg accidentally shot and injured his friend instead, KwaZulu-Natal police said on Monday.

Superintendent Henry Budhram said the two passengers became angry when the taxi they were travelling in stopped at a service station to refuel on Saturday.

?The passengers said they were upset because the driver should have refuelled before picking them up.?

Police said there was an altercation in the taxi and a passenger produced a firearm.

The driver then drove back to the taxi rank.

"The two passengers then began arguing with several taxi drivers at the rank when the armed passengers opened fire," said Budhram.

"He had aimed for the taxi driver and instead shot his passenger friend."

ER24 spokesman Derrick Banks said the man was treated for a gunshot wound to the back of his head.

Budhram said the armed passenger was arrested for attempted murder and a 9mm pistol was seized.