UPDATE: A dangerous Perth inmate has been recaptured after three hours on the run.

Convicted armed robber Johnathan Fraser Sedman was arrested on Thomas Road in Medina after 5pm.

Mr Sedman had been escorted by prison guards to Fremantle Hospital for a pre-scheduled appointment about 2.20pm on Tuesday, when a man armed with a gun ambushed the guards.

According to police, a white sedan approached the parked prison van before the armed man exited the vehicle and confronted the guards.

A guard was allegedly hit across the head with the firearm before Sedman was able to escape into the waiting getaway vehicle, which police said was being driven by a woman.

More than three hours after an urgent appeal to find Sedman was issued, police confirmed the 33-year-old was taken into custody in Medina.

“Several other people are also assisting with inquiries,” a police spokesperson said.

“Police no longer need assistance to locate (the getaway car).”

Mr Sedman will likely face an additional charge of escaping from lawful custody which carries a maximum of seven years’ jail.