Gov. George E. Pataki, speaking yesterday at the closing of the $3.2 billion deal to lease the World Trade Center, said the money from the deal could help finance the long-stalled Second Avenue subway and plans to provide tunnel access for Long Island Rail Road trains to Grand Central Terminal.

The governor said that financing such transportation projects with proceeds from the 99-year net lease would bring the Port Authority of New York and New Jersey out of the real estate business and back to its main mission of developing and maintaining regional transportation facilities. The Port Authority opened the trade center 30 years ago.

''When I came into office in 1995, the Port Authority had hotels, shopping malls, industrial parks and we asked why,'' Governor Pataki said. ''We have worked hard to put those developments in the hands of the private sector experts who pay taxes. And today the Port Authority returns to the core mission of dealing with transportation.''

Aides to the governor and others said that the possibility of using the funds for mass transit had emerged in discussions in recent weeks, as the Pataki administration sought an alternative to the unsuccessful efforts to get federal aid for the two projects. In addition, the two projects were dealt a blow by the defeat last year of the state transportation bond issue, which would have allowed the Metropolitan Transportation Authority to borrow money for the projects.