Three light rail stations in North Baltimore — Mount Washington, Cold Spring and Woodberry — will be closed for three weeks of emergency repairs starting Friday as crews work to shore up significant track-side soil erosion, the Maryland Transit Administration said Wednesday.

Rail service through the stations will be halted, and buses will shuttle riders between the Falls Road and North Avenue stations through July 11, the agency said.

The closures overlap with a 13-game homestand by the Orioles at Oriole Park at Camden Yards downtown and the Inner Harbor's annual Fourth of July celebration — two major drivers of transit use to and from the suburbs north of the city.

There are also many other scheduled events downtown in coming weeks, including the African American Festival at the Camden Yards complex this weekend.

The erosion, not far from the Cold Spring station, has been getting worse for weeks amid heavy rains in the region, officials said. The Jones Falls comes close to the light rail lines nearby.

For safety reasons amid repairs, electricity to the overhead catenary wires that power the rail line will be shut off from the Mount Washington station south to the Woodberry station.

"The way the grid is set up, they had to shut off the power to the wires," said Paulette Austrich, an MTA spokeswoman.

"The safety of our passengers and employees is our highest priority," said Robert Smith, MTA's administrator and CEO, in a statement. "We appreciate everyone's patience as we work quickly to make these emergency safety repairs."

Patience among riders at the Mount Washington station on Wednesday afternoon varied.

"It's absolutely inconvenient," said Alison Loughran, a Park Heights resident who takes the light rail downtown every day.

Sharon Joyner, an administrative assistant who lives in the city and uses the light rail to commute to her job in the county, called the news of the closures "irritating."

"First it was the snow, now it's the rain," she said. "I'm looking at the tracks and they're the same tracks that have always been there."

At least bus connections provided during station closures — which she's lived through before — are usually on time, unlike other MTA buses, Joyner said.

Daily weekday ridership on light rail in fiscal 2013 was 27,537 riders, up from 18,969 in 2006, according to state data.

As many as 75,000 people are expected to visit the city for the Fourth of July fireworks, said Tracy Baskerville, a spokeswoman for the Baltimore Office of Promotion & the Arts, though she did not know what percentage were expected to travel by rail.

Orioles games at Camden Yards have averaged about 31,101 fans in the stands this season. Austrich said the MTA does not have ridership numbers for Orioles games or for past Fourth of July celebrations.

The closure of the light rail stations is the latest infrastructure problem caused by the heavy rains the region experienced in recent months.

Also on Wednesday, officials in Anne Arundel and Howard counties announced an eight- to 12-week closure of part of Race Road in Hanover for work stabilizing a slope damaged by a rain-swollen stream.

At the end of April, a retaining wall holding a city block along East 26th Street in Charles Village above a parallel cut of railroad tracks collapsed amid heavy rains. Repair work on 26th Street is continuing, and city officials have put the cost at $18.5 million. The light rail repair job will cost $1.5 million, Austrich said.

There was substantial flooding from the same rains at the end of April along the Jones Falls Valley from Mount Washington to Woodberry, though the erosion causing light rail problems has been growing gradually over time, Austrich said.