Washington Capitals fans cheer during Game 2 of the second round of the Stanley Cup Playoffs on April 29. (Toni L. Sandys/The Washington Post)

Metro will provide an extra hour of service for Game 4 of the NHL Eastern Conference finals on Thursday after a topsy-turvy saga involving Qatar, the DowntownDC Business Improvement District and the transit agency ended in a deal, D.C. Mayor Muriel E. Bowser announced.

Through the terms of the deal, Qatar would give the DowntownDC Business Improvement District $100,000, and the business group would direct the same amount to Metro to extend service until 12:30 a.m., officials said.

Bowser (D) announced the arrangement on Twitter earlier Thursday, and Metro confirmed late-night service would be in place — though its news release omitted any mention of Qatar.

Qatar Ambassador Meshal bin Hamad al-Thani said the agreement was a gesture of friendship and goodwill toward the local community.

“Qatar firmly believes in power of sports to bring people together in peace and friendship- our Embassy cherishes its role as a member of the DC community and we are pleased to partner with the Mayor, @DowntownDCBID and the Metro to get all Caps fans home safely tonight!” he wrote, punctuating the tweet with “#GoCaps.”

The agreement comes after several days of negotiations that saw an apparent deal fall through after Qatar raised concerns about indemnification clauses in the contract, according to D.C. Council member Jack Evans (D-Ward 2), who is also the Metro board chairman. Changes to those clauses would have required a possibly contentious Metro board vote; there were also concerns about whether Metro was allowed to accept payments from a foreign government.

Asked on Wednesday how the arrangement between Qatar, Metro and the business improvement district was any different, Evans laid out his thinking.

“Metro is entering into the contract with the BID, not with Qatar,” Evans said. “Late-night service is very important, and I’m happy that the downtown bid was able to assist in making this happen as well as the government of Qatar.”

That answer was unlikely to satisfy many who saw the deal as an indirect payment from an oil-rich country to a struggling U.S. transit agency.

Metro said Caps fans leaving the arena could board trains from Gallery Place station, Metro Center’s 11th and G entrance or Judiciary Square’s F street entrance. The rest of the system will be “exit only.”

Riders could find final train departure times on Metro’s website.