India has been reinstated to the Olympics in time for the flag to fly at the Sochi Winter Games.
The International Olympic Committee (IOC) announced the decision today, saying it was the first time in history that a suspension of a national Olympic committee had been lifted during the games.
Three Indian athletes marched into the opening ceremony last Friday under the Olympic flag and were allowed to compete as independent athletes.
But after a special flag-raising ceremony in the Olympic Village today, Day 5 of the Sochi Games, they can compete for India.
The Indian Olympic Association (IOA) ended the stand-off with the IOC by holding elections on Sunday and installing world squash chief Narayana Ramachandran as president.
India was suspended by the IOC in December 2012 for not holding elections according to its own constitution and for electing tainted officials, notably president Abhay Chautala and secretary-general Lalit Bhanot.
Both of them were ineligible to stand this time, according to the new IOA constitution.
Bhanot is charged with corruption during the organisation of the 2010 Commonwealth Games while Chautala is charged in a recruitment scam not related to sport. Both men deny any wrongdoing.
IOC member Randhir Singh, a former secretary-general of the Indian Olympic body, said the IOC made a very important decision for Indian sport.
“This is great news for Indian sport,” he said. “It’s time everyone understands that the Olympic charter is supreme. It is important that sport is run well and tainted officials are kept out in a country of 1.2 billion in which 40% is youth.”
Mr Ramachandran, who served as treasurer of the IOA from 2008 to 2012, is the younger brother of Narainswamy Srinivasan, who is the president of the board of control for cricket in India and is set to become chairman of the International Cricket Council.
BBC News blooper mixes up Ireland and India