MYRTLE BEACH, S.C. (AP) — A $10 million federal grant will go toward upgrading a short line railroad that connects Myrtle Beach to rural areas of North and South Carolina and provides access to freight lines nationwide, a company official said Wednesday.

Improvements will include new rail, ballasts and ties and eventually allow speeds to increase to 25 mph, said Bill Henderson, vice president of R.J. Corman Railroad Group, which bought the line last year.

The company provided a $5 million match to secure the U.S. Department of Transportation grant to Horry County.

The rail was in such disrepair the company has already spent a lot of money in order to restart operations in March, Henderson said, without citing specific figures.

The roughly 90-mile line connects to CSX rails in rural Mullins.

It runs between Mullins and Chadbourn, North Carolina, and south to Myrtle Beach, with stops including Loris and Conway. It previously operated as Carolina Southern but had to shutter about five years ago because bridges along the line failed to meet federal standards.

The short line reduces transportation costs for companies along the line, which include lumber, fertilizer and agribusiness, he said. Officials hope the improvements attract more business.

“The reliability of the newly-improved railroad will incentivize investment and therefore help diversify our economy with new industry,” U.S. Rep. Tom Rice said in a news release announcing the grant.

The state Commerce Department asked legislators to include money for the line’s improvements in the 2016-17 state budget. The final compromise provided nothing, though earlier versions put $4.3 million toward the project.

Secretary Bobby Hitt is committed to the line’s renovation and is already talking with legislative leaders about next year’s budget, agency spokeswoman Adrienne Fairwell said Wednesday.