Police in northern New South Wales are searching for a man who allegedly stabbed another man 27 times after an argument near Uki.

A 62-year-old has told detectives his 41-year-old attacker pulled over the car they were both riding in, punched him in the face and repeatedly stabbed him.

The victim says he tried to run away but the man chased him and forced him into the boot of the car.

He managed to unlock the boot and escape while the car was in motion, and then ran to a nearby property to phone police.