(CNN) From heartbreak to hope for an athlete who experienced 24 hours like no other at the IAAF World Championships in London.
Botswana's Isaac Makwala, barred from running at the Championships on Monday and Tuesday on medical grounds following a norovirus outbreak, has qualified for Thursday's men's 200m final after a dramatic day.
The 30-year-old was regarded as one of the favorites for 400m and 200m gold in, but was forced to withdraw from Monday's 200m heats and Tuesday's 400m final by the sport's governing body, the IAAF, to protect the "welfare of all athletes" and attempt to contain the virus.
Makwala was refused entry into the London Stadium hours before the 400m final, where he was expected to challenge eventual champion Wayde van Niekerk, with the IAAF saying he had been diagnosed with an infectious disease Monday.
But late Wednesday, Makwala's fortunes changed with the governing body revealing that Makwala would be allowed to run an individual time trial in a bid to qualify for the 200m semifinals.
READ: Makwala barred from running after gastroenteritis outbreak
In a race against the clock on a rainy, cold London evening -- Makwala had to finish in 20.53 seconds or faster to qualify for the semis -- he clocked 20.20 seconds before a vociferous crowd which cheered him on in his solo sprint.
Under two hours later, Makwala finished second in his semifinal in 20.14 seconds to qualify third fastest for the final.
Immediately after his race, he told BBC Sport that he was still heartbroken after missing out on a chance to contest for gold in his favored 400m and was "running with anger."
In defending its decision to deny Makwala the chance to compete in the 400m final, the IAAF said it was following a request that Makwala be quarantined in his room for 48 hours, a period which ended at 14:00 BST Wednesday (August 9).
And in a statement issued hours before Wednesday's semifinals, the IAAF said it had received a written request from the Botswanan federation for their athlete to compete in the 200m.
"Given his quarantine period expired at 14:00 hrs (Aug 9) and following a medical examination which has declared him fit to compete, we have agreed under our existing rules that assuming he makes the qualification time, he will run in the 200m semifinal round this evening," read the statement.
The IAAF added that "no athletes already qualified for the semifinal will be adversely affected."
The athlete -- who posted the quickest 200m time of the season (19.77 seconds) coming into these championships -- had said on his Facebook page Tuesday that he was a victim of a "government trap."
Van Niekerk, who won 400m gold with ease and is attempting to become the first man since Michael Johnson to win the 400m and 200m at a World Championships, told reporters Tuesday that he had "so much sympathy" for his rival.
"I saw him just before the 200m heat and the only thing I could think of was just wrapping my arms around him and telling him he should get well soon," said the South African, who also qualified for the 200m final.
Approximately 30 people staying at one of the team hotels have fallen ill, with laboratory tests confirming two of those cases as the norovirus -- an unpleasant but rarely serious stomach bug which causes gastroenteritis (diarrhea and vomiting).
Ireland's Thomas Barr withdrew from the 400m semifinals, while German and Canadian athletes also staying at The Tower Hotel near Tower Bridge were affected too.
Visit cnn.com/sport for all the latest news and videos
Public Health England said most people made a full recovery from the illness -- often caught through close contact with someone carrying the virus or by touching contaminated surfaces -- within one or two days without treatment.
A spokesperson for The Tower Hotel told CNN Tuesday it was "not the source of the illness," adding that the hotel was working closely with the sport's governing body, the IAAF, and environmental health officers to investigate the origins of the outbreak.