North Dakota wheat, soybeans, lentils and peas will soon gain greater access to international markets because of a new agreement to send the crops by rail to Washington state’s Port of Vancouver, which caters to Pacific Rim nations.

The pact signed Wednesday gives North Dakota farmers access to fresh markets and offers another transportation option after the state’s oil boom has captured much of the rail capacity.

The exchange is seen as a win for both states. Washington state and the Vancouver port, its third-largest, get heartland crops, while North Dakota gains industrial and energy supplies and access to a frequently untapped market.

If all goes according to plan, each month, two to four rail shipments will leave the Vancouver port for North Dakota with fertilizers, lumber, paper and energy-related materials. They’ll return with North Dakota farm products for routing elsewhere along the coast, including Canada, or via ships to Asia and Latin America.

Port of Vancouver spokeswoman Abbi Russell said that before this week’s agreement, Washington state only sent energy supplies destined for oil fields in or near Montana and North Dakota. In the future, eastbound shipments should expand to include lumber, paper, cement and fertilizer. Right now, the port has about 50 rail cars’ worth of products ready to ship to North Dakota, Russell said. All westbound shipments will be new.

North Dakota Agriculture Commissioner Doug Goehring praised the agreement, which he signed in Fargo on Wednesday.

The rail contract “provides more marketing opportunities,” Goehring said. “It also provides a major opportunity for North Dakota commodity handlers, especially smaller and midsize companies to access rail facilities on the same basis as larger companies. [That] enables them to remain competitive.”

Todd Coleman, CEO of the Port of Vancouver USA, said the deal should “increase capacity and reliability for farmers needing to move their products to market by rail.”

At the same time, the arrangement increases the eastward flow of supplies for the energy industry. They “are already moving east from the Pacific Northwest to the Mid-Continent. We’re taking it a step further by leasing boxcars to carry those eastbound cargoes and then filling these boxcars with ag products for the return trip to Vancouver.”

Managers at the Port of Vancouver will take responsibility for designing “load centers,” leasing boxcars and coordinating rail routes with BNSF Railway. The port will also provide North Dakota with monthly service reports. North Dakota’s ag department will coordinate with its farmers, exporters and collect production data for the project that took more than a year to bring to fruition.

The first shipments are expected to leave North Dakota in mid-September.

The congestion on railroads in the Upper Midwest has become an economic concern and political issue. Also Wednesday, Minnesota Gov. Mark Dayton sent a letter to U.S. transportation officials urging more work be done to relieve the shipping concerns of farmers.

Russell, with the Port of Vancouver, said this week’s agreement only applies to Washington and North Dakota, though railroads extend eastward to Minnesota and ultimately down to Illinois. “Lots of synergies could be coordinated through that Great Northern corridor,” she said. “But this is an exciting first step.”