Metro will remain open an extra hour Thursday night for the Nats playoff Game 5 against the Chicago Cubs, and for those attending the opening of The Wharf development in Southwest, D.C. Mayor Muriel E. Bowser announced Thursday.

Exelon, the parent company of Pepco, will pay the $100,000 fee Metro requires for extended hours, Bowser said.

“Tonight, Washington, D.C. will host the Nationals’ NLDS championship game and the exciting opening of The Wharf,” Bowser said in a statement. “We want everyone attending these events to enjoy their experience and have a safe ride home at the end of the night. Go Nats and enjoy The Wharf!”

Exelon’s decision to pay for the extra service came at Bowser’s urging, according to a statement from the utility company.

“As the hometown energy provider, we work closely with the city on a regular basis and when the Mayor reached out, we were happy to support this effort that will make it easier for our neighbors to get home tonight,” Exelon said in a statement.

Four stations — Navy Yard-Ballpark, Waterfront, L’Enfant Plaza, and Capitol South — will be “entry only,” while the rest of Metro’s stations will be “exit only.”

The final Green Line train toward Greenbelt will leave Navy Yard at 12:22 a.m. The last train to Branch Avenue leaves Navy Yard at 12:48 a.m.

Metro’s usual closing time weeknights is 11:30 p.m.

Thursday’s make-or-break game is scheduled to begin at 8:08 p.m. and fans were concerned they’d be left scrambling after Metro said it hadn’t found a sponsor to pay the $100,000 deposit to keep trains running late.

Thursday morning, officials said, Exelon stepped up.

“Our commitment to the D.C. community extends beyond powering our customers’ homes and businesses,” Exelon CEO Chris Crane said in a statement. “We want to make sure they can enjoy these landmark events in D.C. and have options for getting home safely and efficiently, and we are pleased to partner with Mayor Bowser to make this happen.”

After SafeTrack, the yearlong maintenance program that concluded in June, Metro lifted its moratorium on late closings and early openings for special events. But the transit agency said extended service would come at a cost: $100,000 per hour — refundable if Metro makes a profit during the extended hours.

The late-night service issue also came up last year, during SafeTrack, when General Manager Paul J. Wiedefeld cited the agency’s urgent safety needs in refusing to run extra trains during the playoffs.

That decision earned Metro a chorus of boos in a NDLS Game 5 — on a Thursday night almost a year ago to the date. Some fans broke out in a chant: “Metro sucks.”

Metro officials say the new late-night service policy puts the onus on event organizers and outside groups to keep the system open.