A humanoid robot "Robovie PC" (right) of Japanese robot venture Vstone crosses the finish line of the world's first full-length marathon for two-legged robots in Osaka. Robovie-PC, a toy-sized humanoid, won the world's first full-length marathon for two-legged robots by a whisker Saturday, beating its closest rival by a single second after more than two days of racing.

Robovie-PC, a toy-sized humanoid, won the world's first full-length marathon for two-legged robots by a whisker Saturday, beating its closest rival by a single second after more than two days of racing.

Five bipedal machines began the non-stop 42.2-kilometre (26.2-mile) contest on a 100-metre indoor track in the western Japanese city of Osaka Thursday morning after doing knee bends or raising their hands to greet spectators.

One of the competitors retired after finishing only the first lap, but the others continued running day and night, getting up by themselves every time they fell to the floor or got into collisions with rivals.

Robovie-PC, 40 centimetres (16 inches) tall and weighing 2.4 kilograms (5.3 pounds), stormed into first place with only a few laps to go after Robovie-PC Lite, which had established a comfortable lead and appeared to have secured an easy victory, suddenly locked up.

Robovie-PC Lite managed to return to the track and fiercely chased the leader, but after 422 laps Robovie-PC crossed the line in 54 hours 57 minutes 50 seconds, organisers said, one second ahead of its rival.

Their average speed was 0.77 kilometres per hour.

After the dramatic finish the two robots -- both made by Vstone Co., a technology firm based in the industrial city which also organised the "Robo Mara Full" race -- waved their arms and bowed, to wild applause from the crowd.

According to the event's regulations, competitors were allowed to change batteries and the servomotors which control the robots' speed and other functions.

The other two robots still running had yet to complete the race Saturday evening.