Charles H. Townes, a Nobel laureate in physics who helped lay the theoretical foundation for the laser, a device with applications in fields as diverse as medicine, commerce, communications and cosmology, died Jan. 27 in Oakland, Calif. He was 99.

Dr. Townes had become a semi-retired professor emeritus in 1986, after 20 years of teaching and research at the University of California at Berkeley, which announced his death. No cause of death was given.

All his life, Dr. Townes liked to say, his main interest was simply figuring things out. He said he made a habit of moving from one job to another, or from one subject to another, every 10 or 15 years, because he was always searching for new puzzles to solve. His curiosity enabled him to move easily from the atomic to the astronomic, from beams of light to black holes.

His career in research was set in motion by happenstance. Unable to find a teaching position during the Depression, he joined Bell Telephone Laboratories in New York and New Jersey. There, he worked on the development of radar and navigation devices during World War II.

He often said it was the combination of his physics background and his training in electrical engineering at Bell Labs that led to his historic work on the laser and its forerunner, the maser. Masers are devices that achieve microwave amplification by a process called “stimulated emission of radiation.’’ Lasers produce lightwaves that have been amplified in this way.

The laser was the brainchild of at least three men. But Dr. Townes — who shared the 1964 Nobel Prize in physics with Soviet scientists Nicolay G. Basov and Alexander M. Prokhorov — was chiefly responsible for the maser.

A bright idea

The concept that led to the maser came to Dr. Townes in 1951, three years after he joined the faculty of Columbia University, where he was a full professor by 35 and director of the Columbia Radiation Laboratory.

On the morning of April 26, 1951, Dr. Townes was in Washington for a conference. Up before the hotel restaurant opened for breakfast, he walked across the street and sat on a bench in Franklin Square. The azaleas were in bloom, the sun was sparkling, and Dr. Townes, who grew up exploring the fields and woods surrounding his family’s South Carolina farm, was deep in thought.

He was thinking about how to create a beam of short-wavelength, high-frequency light. In 1917, Albert Einstein had predicted that it could be done — but how and with what?

Dr. Townes recognized that what was needed was a device that would amplify light by imposing order on the unruly way it is produced in nature. The process he imagined he later called “stimulated emission.”

Light is normally produced when “excited” electrons of atoms return to their normal energy level. Usually, this is a disorderly, or “incoherent,” process, in which an electron might send off radiation in any direction at any time.

Lasers boost a large number of electrons into an excited state and then cause them to emit the extra energy in a kind of controlled chain reaction in which the number of photons within the laser tube quickly doubles, then doubles again and again.

A laser tube allows for the coordinated timing and directing of a beam of photons. In this way, a relatively weak beam of light becomes increasingly strong and coherent.

In 1954, Dr. Townes and his students built a device that used energized ammonia molecules for the stimulated emission of microwave radiation, a device they called the maser. Three years later, Dr. Townes and his brother-in-law, Bell Labs scientist Arthur L. Schawlow, proposed applying a similar process to lightwaves instead of microwaves. Thus, the concept of the optical maser — later dubbed the laser — was born.

In 1960, Dr. Townes and Schawlow, both future Nobel laureates, became the first scientists to receive recognition for the optical maser when Bell Labs filed a patent. (Earlier, Dr. Townes gave the patent for the maser to the Research Corporation for Science Advancement, a private foundation that aids basic research in the physical sciences.)

In 1957, a Columbia graduate student, Gordon Gould, coined the term laser, for “light amplification by stimulated emission of radiation,” and was encouraged during discussions with Dr. Townes to write down his ideas. Later, Dr. Townes claimed that he had the idea for a laser device several months before his talks with Gould.

Although Dr. Townes and Schawlow beat him to the patent office in 1959, Gould filed a counterclaim. A decades-long legal battle ensued before Gould was awarded a separate laser patent in 1977.

The controversy over who was responsible for the laser was further complicated when Theodore Maiman of Hughes Research Laboratories in Malibu, Calif., produced the first working device in 1960. He announced the accomplishment in the journal Nature.

Today, lasers are a commonplace of modern life. They are used, for instance, in atomic clocks, fiber-optic communication, restorative eye surgery and supermarket bar-code readers. More than a dozen Nobel Prizes have been awarded for work done with lasers. When he was well into his 90s, Dr. Townes was using laser technology to study the shapes and sizes of stars.

Inquisitive youth

Charles Hard Townes was born in Greenville, S.C., on July 28, 1915. His father was a lawyer, but the family owned a small farm outside the city limits. The two-story cedar-shingled house was full of books, including encyclopedias and the works of Mark Twain and Shakespeare.

Young Charles was perhaps the most inquisitive of the family’s three boys and three girls. As he recounted in a 1999 memoir, “How the Laser Happened: Adventures of a Scientist,” he was about 10 when he wrote a Christmas wish-list letter to his 18-year-old sister:

“You asked me what I wanted for Christmas. I want mostly hardware, so you better buy out a hardware store. I want some tin shears, some money to buy some iron and wood bits . . . a flat file, a pair of glass cutters, some rifle shot and some one- and two-penny nails.”

A couple of years later, while netting fish to study, he caught a colorful specimen in South Carolina’s Saluda River, near his grandmother’s summer home. It looked like a minnow, but he couldn’t identity it.

He promptly pickled the fish in formaldehyde and sent if off to the Smithsonian. By the time someone wrote back — saying experts there had never before seen that type of fish and asking whether he might catch some more specimens, please — Charles was on to other things.

At 16, he entered Furman University, just a mile and a half from the family farm. He played trumpet in the school band, was a member of the swim team and wrote for the college newspaper. He also earned pocket money by tutoring and selling apples from the farm.

After graduating summa cum laude in 1935, with degrees in modern languages and physics, he finished the requirements for a master’s degree in physics at Duke University a year later. A cross-country bus trip in 1937 — during which he explored the Grand Canyon and sometimes slept on park benches — brought him eventually to Cal Tech, where he received a PhD in 1939.

In 1941, he married Frances Hildreth Brown. Besides his wife, of Oakland, survivors include four daughters, Linda Rosenwein, Ellen Townes-Anderson, Carla Kessler and Holly Townes; six grandchildren; and two great-grandchildren.

Dr. Townes spent much of his working life at academic institutions, including the Massachusetts Institute of Technology as well as Columbia and Berkeley. Looking for new challenges, he turned to astrophysics in the latter part of his career.

In 1985, after a decade spent studying infrared and radio emissions, he led a team of researchers that discovered a massive black hole at the center of the Milky Way galaxy, a finding that dramatically advanced the understanding of the universe.

In addition to the Nobel Prize, Dr. Townes’s honors included election to the National Academy of Sciences and the American Academy of Arts and Sciences. He enjoyed mountain climbing, scuba diving and growing African violets.

A Christian who found no conflict between science and religion, Dr. Townes received the $1.5 million Templeton Prize in 2005 “for progress in spiritual knowledge.” He donated most of the money to academic and religious institutions.

Unlike many scientists, Dr. Townes didn’t shy away from talking about religion. He once said he believed that it was “extremely unlikely” that the laws of physics, which led to life on Earth, were “accidental.”

He also said he believed that “science and religion will converge in the long run because both are trying to understand our universe. Science is trying to understand how the universe works. Religion is basically trying to understand the purpose of the universe. . . . The purpose and how it works must be related.”