Metro ridership was increasing at the fastest rate in years just before the coronavirus pandemic hit the region and quashed the transit agency’s momentum, according to new data.

February ridership statistics, released this week, showed weekday rail ridership was up 9 percent compared with February 2019. Passenger trips were up 16 percent on Saturdays and 19 percent on Sundays, according to Metro data.

More surprising was the small increase in riders on Metrobus, which has been consistently losing customers the past few years. Weekday and Saturday ridership rose 1 percent in February compared with the same period last year. Sunday ridership was up 4 percent, according to Metro records.

Parking at Metro station lots was also up — 11 percent.

The Metro ridership gains bolster a trend that began last year, after a troubled but transformative four-year stretch when the system lost thousands of customers following the 2015 L’Enfant Plaza smoke incident. The tragedy, in which a passenger died, led Metro to refocus on safety and reliability, including the year-long SafeTrack rehabilitation program and service-hour cuts to increase time for maintenance and repairs. The years-long projects have been frustrating for passengers, however, because of the accompanying station and platform closures, single-tracking and delays.

But the major investments and projects began to pay off last year. Rail ridership was up 2.3 percent for the first six months of 2019. The system finished the year up 20,000 trips, an increase of 4 percent.

The trend continued into 2020. February’s passenger trip totals were “the biggest real growth numbers” Metro had seen since the increase in riders began, Metro spokesman Dan Stessel said.

To build on the growth and attract even more customers, Metro has two big changes in service coming this summer. Starting in July, Metro will run 5 a.m. to midnight Mondays through Thursdays and until 2 a.m. Fridays and Saturdays. Later service was a top wish from riders — and D.C. officials, who said workers in the city’s growing late-night service sector struggle to find affordable transportation.

A flat $2 weekend fare will also be instituted to encourage more families to use Metro.

Metro’s board of directors approved those changes last week as part of the fiscal 2021 budget.

However, the pandemic has created uncertainty.

In mid-March, Metro began drastically decreasing routes, frequency and capacity on bus and rail routes to limit its workers’ exposure to customers and lower their risk of contracting the virus. The agency, like others across the country, also wants to lower the potential for public transportation to become a conduit for the virus to spread.

The transit agency also shut down 19 stations and nine entrances at open stations to limit staffing and save on dwindling disinfectant and cleaning supplies.

Fear of the coronavirus, as well as local and state government recommendations and stay-at-home orders, have also driven down transit use.

Metro ridership was down 95 percent Wednesday compared with an equivalent day in 2019. Metrobus ridership is down 74 percent, according to agency records.

Statistics show the losses, at least on rail, began March 6. Ridership dropped by 2 percent that day before plummeting week after week.

The financial toll, Metro said, is fare revenue losses of $2.5 million a day.

It is unclear what will happen when the region emerges from the pandemic, but the staggering job losses in the District, Maryland and Virginia do not bode well. Still, Metro General Manager Paul J. Wiedefeld has said there is just as much reason to think that ridership will rebound.

“It could in fact increase, for all we know,” Wiede­feld said late last month. “So we all have to work through this and adjust as we learn more.

“The whole world is changing around us,” he added. “People’s travel patterns and how they’re working is changing, so let’s see how that plays out and we’ll adjust along the way like everyone else is doing.”