The Metro bus system in 2015 had its highest ridership in nearly three decades because of a new contract with the Portland school system to transport high school students.

The Greater Portland Transit District, commonly known as Metro, carried passengers on 1,568,136 one-way trips, a 5.3 percent increase over 2014. That’s the highest ridership since 1986.

The 110,632 trips made by students during the last four months of 2015 provided the boost. The students accounted for 18 percent of the total of 606,600 trips during that four-month period.

Without the students, Metro would have seen ridership decline about 2 percent from 2014, when there were 1,489,116 trips.

The agency lost riders when MaineCare made changes last year to the bus pass benefit for clients who take public transit to medical appointments. Metro is not able to track how many riders it lost, but revenue losses are estimated at $175,000 to $200,000, according to Greg Jordan, Metro’s general manager. The transit agency collected $1.75 million in fares in 2015.

Those losses were offset, however, by a doubling of ridership on Sundays, from about 600 to 1,200, after the agency added more routes and added buses to some routes.

The Portland School District will pay Metro $115,000 to $160,000 to cover Portland high school students to ride Metro buses instead of the traditional yellow school buses. The school district pays for student trips during the school week, and Metro allows students to travel for free on weekends.

The contract has brought financial stability to the bus agency, and a portion of the new revenue can be used for system improvements, Jordan said. In addition, getting young people to ride the bus every day expands Metro’s future customer base, he said.

“The long-term gains for us are significant,” he said. “We are building a generation of transit riders.”

He said the roll out of the new system went fairly smoothly. The biggest problem was Route 9, a new route introduced for the student program that loops around the city stopping at Portland, Deering and Casco Bay high schools, and includes some service into the North Deering neighborhood. The route had so many riders the agency added more buses.

Changes for 2016 include the installation of 25 to 30 new bus shelters along all routes, expanded service to Yarmouth and Freeport, and the launching of a GPS tracking system that will give passengers “real time” bus arrival information via website, text message and mobile applications.

The first new bus shelters are due to arrive next month and will be installed as quickly as possible, Jordan said.

He said the new tracking system will be rolled out later this year. The real-time arrival system is now it its final stages of development, and will also be used by South Portland Bus Service and Casco Bay Lines. The three agencies partnered to award a single contract to one company, Clever Devices Ltd.

In May, Metro will launch the new commuter bus service between Portland and Yarmouth and Freeport, Jordan said.

The agency has ordered three 20-passenger buses, which will feature Wi-Fi service, high-back seats and racks for briefcases and other luggage.