Which team contest was an official Olympic sport until 1920?
It appeared in the Games from 1900 to 1920.
Tug of war appeared in the Olympic athletics program at the Games of 1900, 1904, 1908, 1912 and 1920. Teams of up to eight pullers competed to drag the opposing side across a line. The 1900 Paris event was won by a mixed team of Danish and Swedish athletes, the 1904 St. Louis event had American club teams filling the podium, and several countries entered police or military squads in later editions.
The 1908 London contest is famous for a dispute over equipment. The City of London Police team beat a team of American athletes representing the United States, who protested that the winners wore heavy, specially nailed boots that gave them an unfair grip, and the protest was rejected. The final Olympic tournament, in Antwerp in 1920, was won by Great Britain, and one of its medalists, Frederick Humphreys, was reported to be 72 years old, among the oldest Olympic medalists on record.
After 1920 the sport was dropped as the organizers cut the number of team events and tried to keep the Games manageable. It was never restored, though the sport continues under its own international federation, with world championships and a place in the World Games. Record keepers regard the early tug-of-war medals as official Olympic results, which is why the sport belongs in the list of discontinued Olympic events, although the 1906 Intercalated Games, which included it, are not counted by the IOC.