BAYONNE— Can Opie help salvage the Military Ocean Terminal? Can the terminal be magically transformed into the land of Oz?

Stay tuned.

The Military Ocean Terminal is a 437-acre peninsula, partly man-made, that juts two miles out from this working-class city into Upper New York Bay, equidistant from the Verrazano-Narrows Bridge to the south and the tip of lower Manhattan looking north. Both are in spectacular view of the terminal, as are the green robes of the Statue of Liberty, the orange Staten Island ferries that move across the bay and the massive cranes of the Global Marine Terminal on the Port Jersey Peninsula in Jersey City, across a narrow channel.

The views are no small matter in an effort by Bayonne to sell developers on the potential of the terminal. The Army seized the terminal for military use in 1941, and shipped out troops, armaments and supplies for every major conflict since World War II. At one time the terminal employed more than 3,000 Army personnel. The Army finally shut it down in 1999, at the behest of the Defense Base Closure and Realignment Commission.

Since the closing, Bayonne has signed a five-year master lease with the Army good through 2004, and beyond that, the city is asking the military to give back the peninsula. While Pentagon officials decide whether to give the city back the property -- a decision is expected this spring -- the lease allows Bayonne to sublet parcels of the peninsula and space in offices and warehouses left behind by the Army.

In the long run, Bayonne hopes to attract housing, offices, a hotel or conference center, office and retail space and a port facility. In the meantime, the point of the lease is to generate some revenue to offset the loss of economic activity that resulted from the base closing.

That's where Opie and Oz come in.

One of the subleases is to Universal Studios, which is using the space for production of ''A Beautiful Mind,'' a movie starring Russell Crowe and directed by Ron Howard, who still looks a lot like Opie, the role he played on ''The Andy Griffith Show.'' The film, due out in November, is based on a biography of John Forbes Nash Jr., a Nobel Prize winning economist at Princeton.

Universal is leasing 20,000 square feet of office space in Building 82, a former Army administration building, plus another 80,000 square feet of warehouse space, where sets are now under construction. The six-month lease is worth a total of $600,000, paid to the Bayonne Local Redevelopment Authority, the entity created to market the property.

''Oz,'' HBO's jailhouse drama produced by Tom Fontana, is also helping to tide over the Military Ocean Terminal. The show, which had been evicted from space housing its 60,000-square-foot prison set in Manhattan, is leasing 120,000 square feet of warehouse space, plus another 6,000 square feet of offices. That deal, also for six months, is worth $450,000.

The production teams like the terminal for its proximity to New York, its large spaces, its affordability and even the fact that, as a military installation, it is still a no-fly zone, minimizing noise interference from commercial aircraft. And, of course, there is the view.

''I'm in SoHo and it took me 22 minutes to get here,'' said Todd Hallowell, executive producer of ''A Beautiful Mind.'' ''This is like driving to Universal Studios, except you can see the Statue of Liberty. You could never afford this at New York prices.

Clearly, Hollywood has discovered Bayonne. The real-life image of Mr. Hallowell, in his sunglasses and champagne-colored sport utility vehicle, being waved through the terminal gate could have been spliced right into a Robert Altman film.

The Bayonne Local Redevelopment Authority is a public entity whose board members and executive director are appointed by Mayor Joe Doria, and whose dual mission is to market the property for short- and long-term use while negotiating the peninsula's transition from military to city ownership. The lease money pays for the commission's expenses, including a staff of four, plus miscellaneous improvements to the property.

''A Beautiful Mind'' and other productions, which have included various television commercials, benefit more than local officials and film gladiators, say members of the authority.

''They're contracting with local contractors, they're getting their dry cleaning done in Bayonne, they're going to Bayonne restaurants,'' said Nicholas A. Chiaravalloti, executive director of the redevelopment authority, referring to the production crews. ''We're excited about having the film business down here. What we're even more excited about is to have the quality of people down here like Ron Howard and Tom Fontana.''

But the Marine Ocean Terminal is not all about glamour. The redevelopment authority also sublets space to Hudson River Village, a 40-room hotel occupied mainly by Continental Airlines flight attendants; the Northeast Auto Marine Terminal, which is occupies 37 acres; and Bayonne Dry Dock and Repair, which uses the military's massive dry dock facility, occupied the other day by a 700-foot freighter.

Other activity includes the removal of asbestos building panels by teams of Army contractors in white jumpsuits and gas masks, work Mr. Chiaravalloti said is being paid for by a $7 million grant secured by Representative Robert Menendez. It is still uncertain, however, who will pay for other environmental work necessary for development to proceed, like the removal of PCB's that leaked into the soil from old oil and gas tanks.

Whatever the prospects, there seems to be a buzz. Mr. Chiaravalloti, a lawyer by training, said he is in negotiations with other production companies about leasing space, although he declined to say which ones. Mr. Hallowell said he became interested in the peninsula after hearing that Mr. Fontana had struck a deal here, and that others in the industry have been asking him about the area since he set up shop.

''You could build a back lot here,'' he said.

Indeed, the broad alley flanked by old warehouses where Universal and HBO are now building sets has the feel of an old film studio, complete with a water tower ripe for a studio logo. Or at least, so says Lt. Martin Dziubek, a veteran Bayonne Police officer in charge of the peninsula, who drinks his morning coffee every day while taking in the spectacular views from the eastern bulkhead. ''You can imagine a big WB logo up there,'' he said. ''just like the old Warner Brothers studio.''

Photos: The Military Ocean Terminal at Bayonne, shut by the Army in 1999, offers views, a dry dock and space for film and television projects. (Photographs by Monica Graff for The New York Times)