By John Crawley

WASHINGTON (Reuters) - The United States and Japan reached a landmark aviation agreement on Friday, a deal that eases barriers to passenger and cargo services and opens up the possibility for stronger alliances, officials said.

The deal, reached after more than seven months of negotiations, is good news for American Airlines, a unit of AMR Corp <AMR.N>, and other U.S. carriers shut out of directly serving Tokyo.

The accord also could be a boost for financially strapped Japan Airlines Corp <9205.T> (JAL), which is restructuring under Japanese government supervision.

Funds looking to invest in the transpacific market also could see new opportunities through joint ventures and expanded airline alliances, if U.S. regulators view them favorably.

"Once this agreement takes effect, American and Japanese consumers, airlines and economies will enjoy the benefits of competitive pricing and more convenient service," U.S. Transportation Secretary Ray LaHood said in a statement.

Stakes were high as the final round of talks faltered midweek, before picking up on Thursday and ending in a marathon negotiation session on Friday.

U.S. to Japan routes for decades have been dominated by a handful of airlines, including United Airlines, a unit of UAL Corp <UAUA.O>, Northwest Airlines, which was taken over by Delta Air Lines <DAL.N> last year, and FedEx Corp <FDX.N>.

Japan Airlines and All Nippon Airways Co <9202.T> (ANA) are the dominant transpacific airlines in Japan.

Under the agreement, airlines from both countries would be allowed to select routes and destinations based on consumer demand for both passenger and cargo services.

This can be achieved without limitations on the number of U.S. or Japanese carriers that can fly between the two countries or the number of flights they can operate.

ANTI-TRUST RULES

The deal would remove restrictions on capacity and pricing, and provide unlimited opportunities for cooperative marketing arrangements, including code-sharing, between U.S. and Japanese carriers.

The Japanese government insisted the deal not take effect unless the United States waive certain anti-trust rules and let U.S. and Japanese carriers deepen their alliances.

Anti-trust immunity would allow alliance partners to share scheduling, pricing and other information, a combination of operating forces that have proven lucrative and an alternative to mergers.

JAL said in a statement that it intended to apply for immunity with a "strategic U.S. partner" as soon as possible.