A ban on India's Olympic Association (IOA) has been lifted, allowing the country to return to the Olympic fold, officials said.
The International Olympic Committee (IOC) suspended India for electing officials accused of corruption in 2012, in breach of the Olympic charter.
But on Sunday the IOA conducted fresh elections which were seen as fair.
Indian athletes have been competing at the Sochi Winter Games under the IOC flag but can now do so under their own.
This is the first time a suspension of a national Olympic committee has been lifted during an Olympic Games and it comes into effect immediately.
"The decision means Indian athletes can compete for their national Olympic committee. They can walk behind their national flag at the closing ceremony," IOC spokesman Mark Adams was quoted as saying by the AFP news agency.
"The Indian flag will be raised in the [Sochi Winter Games) village, at a time to be announced," Adams added.
IOC member Randhir Singh welcomed the decision and said it was "great news for Indian sport".
"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," he told the Associated Press news agency.
The IOA elected a new set of officials, led by world squash chief N Ramachandran on Sunday, ending a stand-off with the IOC.
The International Olympic Committee (IOC) suspended India in December 2012 for holding elections in defiance of the Olympic charter and appointing officials facing corruption charges related to the 2010 Commonwealth Games.
The IOC also insisted India had to maintain ethics rules and bar officials charged with a criminal offence.