An estimated 150 persons lost their lives to fires in Maryland last year, compared with 111 for all of 1981, the state fire marshal's office reported last week. A third of those deaths occurred during the first six months in Baltimore, which later launched a city-wide campaign to install smoke detectors and otherwise improve fire safety.

There were eight fire-related deaths in Montgomery County in 1982, compared with six the year before; Prince George's County fire officials said fire claimed 19 lives there last year, down from 25 in 1981. Anne Arundel County also saw a decrease in fire deaths: two last year, compared with six the previous year.

Captain Patrick Flynn, spokesman for the Baltimore Fire Department, said most of the 65 deaths in his city last year--a dramatic increase from the previous year's 29--"need not have happened. They were caused by carelessness, a lack of smoke detectors and lack of fire escape plans."

In one of those fires, 10 people were killed in a row house where candles were being burned because the electricity had been turned off. Another fire, caused by careless smoking, killed seven residents in one house.

As part of a fire department campaign to get smoke detectors installed in Baltimore's nearly 200,000 homes, inspectors in October began going door to door to determine if the state's 4-year-old smoke detector law was being obeyed.

"We figured that prior to the drive, 50 percent at the most had smoke detectors. Now our inspections show that it's about 89 percent," Flynn said. Inspectors checked 103,000 homes, he said.

Smoke detectors have been required in houses for several years, but the push began anew last year when the state law was expanded to include multi-family buildings.

"Baltimore is way safer when it comes to fires now than it was at the start of 1982," Flynn said. "Ironically, it seems the tragic deaths of those 30 people early this year will help save a lot of lives in the long run."

Although fire inspectors don't go door to door searching for smoke detectors in houses and apartments in Prince George's, Captain Bernard Becker of the county fire department said this week that surveys suggest there is better than 50 percent compliance. Montgomery County reports 75 percent compliance.

The suburban Maryland counties follow similar procedures for detecting violators. Becker said that when firefighters answering a fire or ambulance call and notice that there is not smoke detector in the home, the occupants are mailed what Becker calls a "nasty-gram" notifying them of the violation. Occupants have 15 days to let the fire department know that they have corrected the situation.Although the law is rarely enforced, those who fail to install the detectors can be fined up to $1,000 or sentenced to six months in jail, Becker said.

"Drives to install smoke detectors have proved successful in reducing fatal fires in many cities," especially Baltimore, said Joseph L. Donovan, superintendent of National Fire Academy in Emmitsburg, Md. "The next big thing is residential sprinklers . . . . When we get those we should be able to lick a lot of problems."

Most of the jurisdictions cite careless smoking as the biggest culprit in residential fires, but wood stoves and the growing popularity of portable kerosene heaters have fire officials worried.

The kerosene heaters are "killers," contends Captain John M. Best, assistant Montgomery County fire marshal. He said that even though the newer models are designed to shut off if overturned, there is still a chance the fuel may leak out and ignite.

The greatest hazard, however, is when people use highly flammable gasoline instead of kerosene in the heaters, Best said. Heaters are illegal in the city of Baltimore and may not be used in apartments in Montgomery County.