Seven others were injured, some seriously, officials said.
The incident on Monday, which took place on the anniversary of the 1945 atomic bombing of the city of Nagasaki, is certain to increase public distrust of the nuclear industry in Japan, which depends on nuclear power for a third of its energy needs.
"Radioactive materials weren't contained in the steam that leaked out," an official at the Nuclear and Industrial Safety Agency said.
"We've received a report that there is no impact from radiation on the surrounding environment."
Police initially said five workers had died, but later corrected the figure to four.
The accident occurred in a building housing turbines for the No.3 reactor at the Mihama nuclear plant in Fukui prefecture, 320km west of Tokyo.
The accident is expected to raise
public distrust of nuclear energy
An official at Kansai Electric Power Co Inc, which runs the plant, said the 826,000 kilowatt nuclear generation unit at the facility shut down automatically when the steam leaked from the turbine, which is in a separate building. The company was unsure when it would restart.
"We are now investigating the cause," the official said. The temperature of the leaking steam was 142C.
He said the workers involved, who were preparing to shut down the plant for maintenance, were all contractors, and 221 people were in the building at the time.
Prime Minister Junichiro Koizumi said he had not heard details of the accident. "But I think we must do our best to investigate the cause, to prevent a repeat and to implement safety measures," he said.
Chief cabinet secretary Hiroyuki Hosoda added: "I think the cause will become clear within several days."
No reactor problem
A trade ministry spokesman said there was no technical problem with the core nuclear reactor at the plant.
The Mihama plant was the first nuclear plant built by Kansai Electric. The No.1 reactor began service in November 1970.
"I think we must do our best to investigate the cause, to prevent a repeat and to implement safety measures"
Japan prime minister
A number of towns in Japan have held referendums in the past few years and voted against construction of more nuclear plants.
The worst accident at a nuclear facility in terms of radiation was at a uranium processing plant in Tokaimura, a town north of Tokyo.
That took place on 30 September 1999, when an uncontrolled nuclear chain reaction was triggered after three poorly trained workers mixed nuclear fuel in a tub.
The resulting release of radiation killed two workers and forced the evacuation of thousands of nearby residents.
In a separate incident on Monday, Tokyo Electric Power Co, Japan's biggest power producer, said it had shut a nuclear power generation unit at its Fukushima-Daini plant due to a water leak.