BANGKOK — An error by race organizers has made Bangkok home to the world’s longest half-marathon.

Instead of the typical 21-kilometre run through Thailand’s steamy capital, the Standard Chartered Bangkok Marathon on Sunday accidentally extended its annual half-marathon to nearly 28 kilometres.

The bonus kilometres came as a surprise to runners, who unleashed a tirade of complaints on social media after the event.

The Jogging Association of Thailand, one of two organizers of the race, admitted to the error late Monday.

“The association apologizes for the mistake,” Songrakm Kraison, the association’s vice-president, told The Associated Press. “It will not happen again in the future.”

The Athletic Association of Thailand, which oversees athletic events in the country, said it discussed the mistake with the organizers, who “admitted that a technical error happened during the half-marathon event,” said Surapong Ariyamongkol, the association’s secretary-general.

He said race officials responsible for pointing half-marathon runners in the right direction inadvertently directed them to make a U-turn at the wrong place.

“It added more than three kilometres to each lap, therefore more than six kilometres were added to the whole half marathon,” Surapong said. “We have rebuked the association but we could not do anything else.”

The marathon’s Facebook page filled with comments on Sunday and Monday from runners who called it “ridiculous,” a “massive miscalculation” and “incredibly dangerous” for runners who had trained to run just 21 kilometres.

Others joked that it should be renamed the “Super Half Marathon,” or as one Facebook comment noted, it could be seen as a by-product of race inflation: “Hey, they increased the price this year, so you get more kilometres for your money.”