A sport invented by Pierre de Coubertin, founder of the modern Olympics, the event involves fencing, swimming, horse-riding, shooting and running. At the 2012 Olympics, it takes place in a single day at three separate venues.
In the swimming leg, a 200 metres freestyle race, the two fastest swimmers both broke the previous Olympic record of 2:08.86. Kovacs set a new record of 2:08.11 while Britain's Samantha Murray clocked 2:08.20.
With points from both the fencing and the swimming aggregated, Toth led the field with 2,132 points, followed by Yane Marques of Brazil with 2,116 points and Murray in third place with 2,096 points.
Kovacs, who performed poorly in the fencing, was only ranked 22nd overall despite her record-breaking swim.
Under a complex scoring system, points awarded to athletes in the fencing, swimming and riding are combined into a time handicap, meaning that whoever is in the lead after those events gets to start the combined running and shooting event first. The others follow in an order determined by their score.
Whoever crosses the line first in the biathlon-style finale wins gold, making it easy and exciting for spectators to follow.
Modern pentathlon is celebrating its Olympic centenary in London, having made its debut in Stockholm in 1912. But women pentathletes have only been competing in the Olympics since the Sydney Games in 2000.
Latvia's Elena Rublevska, silver medallist in Athens in 2004 and the only woman pentathlete to have competed in all four Games since Sydney, won the fencing with 1,000 points, having won 25 bouts and lost 10.
But Rublevska is not as strong in the water as she is on the piste, and she had dropped to eighth position after the swim.
Hungary's Toth, a former junior world champion, now looks in strong contention for a medal, as does Britain's Murray.
World number one Laura Asadauskaite of Lithuania was in fourth place overall after the swim. With her strongest event, the running and shooting combination, still to come, she remained the favourite to win gold.
Germany's Lena Schoneborn, the defending Olympic champion, was in 16th place, but she too is a very good runner and may be able to claw her way back into contention for a medal.
Derided by critics as an archaic sport not easily accessible to young athletes around the world, modern pentathlon has introduced innovations over the past 20 years to try to keep in touch with the times.
The main novelty at the London Games is the combination of running and shooting into a single event, to make a more exciting finale for spectators.
In the fencing, each of the 36 competitors fenced against each of the others in bouts lasting up to one minute. The swimming was a straightforward race against time, with points awarded based on the time achieved.
After the swim, the athletes head to Greenwich Park, in a different area of London, for a show jumping competition in which they are assigned unfamiliar horses to ride, just to complicate matters. The combined shooting and running event also takes place at Greenwich Park.
Athletes shoot at five targets and once they have hit them all, they run 1,000 metres. They do this three times in a row. In another innovation, they will use laser guns and electronic targets instead of the traditional air pellet pistols.
Modern pentathlon survived a vote on its Olympic future in 2005 but will be at risk next year when the International Olympic Committee picks 25 core sports for the 2020 Games onwards.
There will be stiff competition from sports including baseball, karate and squash.

