ASHKELON, Israel, April 21 — After 18 years behind bars for revealing Israeli nuclear secrets, a defiant Mordechai Vanunu headed out of prison today a partly free man, flashing the victory sign and declaring he was proud of what he had done.

Mr. Vanunu, 49, is returning to a society where he appears to be as widely reviled today as in 1986, when he was kidnapped by Israel's intelligence service in Rome after granting a detailed interview on Israel's clandestine nuclear program to The Sunday Times of London.

The former nuclear technician faces a list of restrictions that bar him from leaving the country for a year or speaking with foreigners. He must tell authorities in advance before traveling inside Israel.

Yet he held an impromptu press conference in the Shikma Prison courtyard before reaching the street, where dozens of supporters, mostly American and British, cheered him as a hero of the anti-nuclear movement, while several hundred Israeli detractors denounced him as a spy and a traitor.