Metro riders will have a way to get home after any home Washington Nationals playoff games after LivingSocial agreed to pay for up to two hours of extra service following any weeknight games.

The idea struck Tim O'Shaughnessy,the CEO of the D.C. daily deal site,while riding Metro Wednesday morning when he read about the impasse among the city, the baseball team and Metro.

"It came together in 24 hours and it felt like the right thing do," O'Shaughnessy told reporters Thursday. "This just seems like one of those things that could be solved."

While O'Shaughnessy later admitted an affinity for his hometown Minnesota Twins, he said he has been a Nats fan for the last seven years.

The company's agreement means that the last Metro trains will leave the Navy Yard station at 12:20 a.m. on game nights, instead of 11:20 p.m., said Metro spokesman Dan Stessel. If the game is still going at 11:45 p.m., the agency will stay open a second hour at the company's expense for all weeknight home games. Friday and Saturday night games are not an issue, as Metro stays open until 3 a.m.

While the start times and game dates have not been set, some games during last year's division series didn't start until 8:37 p.m., making it more likely that the games would run past weeknight closing time.

Metro also said that it has suspended some of the planned track work shutdowns in October that would have coincided with six possible playoff games, as The Washington Examiner reported last week.

It's not clear how much money LivingSocial will be on the hook to pay for the good public relations move. Metro charges $29,500 per hour of extra service. LivingSocial would need to have 5,504 riders pass through the system during the late-night service to recoup the money for one hour of service, or double that for two hours.

On the busiest game nights at the 41,546-seat stadium this season, some 10,000 riders have entered the Navy Yard station after games, according to Metro.

Metro credits those who pay for extra service $5.36 per rider who enters the station after normal hours, presuming that the rider has taken a round trip. Metro keeps any extra revenue if more riders use it.

The question of Metro service after Nats games had been debated for weeks, with no one agreeing to put down the $29,500.

The Nationals had refused to pay, despite having done so for a May game against the Phillies. Reports suggested that Major League Baseball was uncertain about setting a precedent. The District, which had paid for the service, balked at coughing up the money, having financed the stadium and paid for police security since it opened in 2008.

Meanwhile, Metro said it doesn't cover the extra cost. Other groups pay for extra service for other sport events or gatherings, such as this week's Madonna concerts.

The issue came to a head when an Aug. 20 game against the Atlanta Braves lasted 13 innings, stranding scores of riders who stuck it out to see the Nats win.