BOSTON — Norman Ramsey, who shared the 1989 Nobel Prize in physics for his research into atomic energy levels that led to the creation of the atomic clock and MRI machines, has died. He was 96.

Ramsey died in his sleep at a Wayland nursing home Friday, his wife, Ellie Ramsey, said Monday.

Ramsey, an emeritus professor of physics at Harvard University and longtime Brookline resident, wrote in his autobiography for the Nobel Prize he shared with Hans Dehmelt and Wolfgang Paul that he was inspired by failure in molecular beam magnetic resonance experiments in the late 1940s to invent a new technique of measuring the frequency of radiation from atoms using two electromagnetic fields.

The technique is known as the “separated oscillatory fields method,” or more informally among physicists, the Ramsey method, said his protege and longtime friend, Daniel Kleppner, a physics professor emeritus at the Massachusetts Institute of Technology.

It was used in the hydrogen maser, developed to measure the effect of gravity on time, Kleppner said. It led to the development by others of the world’s most accurate timekeeper, the cesium atomic clock. Since 1967, the second has been defined as the time during which the cesium atom makes 9,192,631,770 oscillations.

Ramsey in 1989 after his Nobel win called it a “valuable application” that has been used in radio astronomy, satellite navigation, space exploration and to test the theory of relativity.

Ramsey’s research also led to invention of the MRI machinery now used extensively in medicine, Kleppner said.

“His work has had a broad impact, and his concepts are pervasive” he said.

After learning he’d won the Nobel Prize, Ramsey said he attributed his long interest in science to the fact that “it’s fun.”

“Basically, I’m interested in all the laws of nature,” he said.

Ramsey’s mother was a college mathematics teacher and his father was a West Point graduate and career Army officer. He developed an interest in physics at a young age when he read an article on the quantum theory of the atom. He graduated from high school at age 15 and enrolled at Columbia University in 1931.

During World War II he worked on radar projects at MIT, and as a radar consultant to the secretary of war, ultimately working on the Manhattan Project that developed the atomic bomb.

He helped establish the Brookhaven National Laboratory in New York after the war, before joining the Harvard faculty in 1947, where he taught until 1986.

“He was exuberant, outgoing, friendly, incredibly energetic and inquisitive,” said Kleppner, Ramsey’s graduate student at Harvard in the ’40s. “But above all, he had tremendous scientific integrity and honesty.”

His wife remembered him for his sense of humor, his penchant for adventurous travel and his love of sports and the outdoors. While visiting Norway in the 1930s, he developed a lifelong love of skiing, which he passed on to his children and grandchildren.