PITTSBURGH (AP) _ Ronnie DeSillers clung to an autographed picture of President Reagan and told his mother not to cry as he headed for the operating room, where surgeons transplanted today a liver into the 7-year-old boy.

The child emerged from 12 hours of surgery at 5:50 a.m. in critical but stable condition, which is considered normal following transplant surgery, said Lynn McMahon of Children's Hospital of Pittsburgh.

''He's doing beautifully. So far, the liver seems to be working well. It was a perfect fit,'' said Dr. Carlos Esquivel, a transplant surgeon although not one of Ronnie's surgeons.

The 72 hours immediately following surgery will be the most crucial for Ronnie because of the threat that his body's natural defenses will attack the new organ or that infection will set in, Esquivel said.

His mother, Maria DeSillers, and her fiance, Jose Castillo, visited Ronnie briefly in the intensive care unit.

''It was rough. Unless you're a parent who's gone through it, there are no words that can explain what it feels like to walk into an ICU unit and see your son or your daughter all hooked up to all kinds of machines,'' she told reporters at the hospital.

''What I try to think of, this is the means to the end result of him being healthy and having a better life. But it was very, very emotionally draining,'' said the mother, appearing fatagued and anxious.

In Washington, deputy White House press secretary Dale Petroskey said today, ''The president and Mrs. Reagan are gratified that Ronnie DeSillers appears to be doing well and that the operation went well. He remains in their prayers.''

The Miami boy, whose plight captured the heart of the nation after $4,000 in donations was stolen, had been undergoing tests here since last week.

Doctors had said he would live months, perhaps only weeks, without a transplant.

A donor liver with the boy's rare blood type, AB, was found Tuesday.

Maria DeSillers said she told her son the photo of he received from the president might get lost or broken, and suggested he leave it in his room.

'''No, Ronald (Reagan) has to come with me,'' Ms. DeSillers, her voice breaking at a news conference, quoted her son as saying.

''Once he realized I couldn't go with him past a certain point ... I started crying and he said, 'Mommy, please don't cry.' He said, 'I'm going to be all right, just don't cry.'

''He said, 'Are you sure you can't sneak in with me? I won't let them know you're here.' That broke my heart to hear that.''

Ronnie received an estimated $400,000 in donations, including $1,000 from the president, after the money raised by classmates was stolen from his Fort Lauderdale school.

The boy was taken into the operating room about 6 p.m. Tuesday, surrounded by a clown doll, stuffed dog, alligator and teddy bear and Reagan's picture, signed, ''To Ronald DeSillers from another Ronald.''

''He was very optimistic. He's a very brave little boy,'' Ms. DeSillers said, glancing at the lion puppet Ronnie asked her to guard during the operation.

Miss McMahon, in keeping with hospital policy, refused to identify the organ donor.

''I don't know who they are or where they come from,'' Ms. DeSillers said, ''but I hope they realize that if Ronnie lives, a part of their child ... will live on with Ronnie a long, long time. And that whatever good Ronnie can do as an adult will have been because of their gift of love.''

Ronnie was born with liver ducts too small to expel fluids, a condition that has caused his liver to fail. He had been in serious condition since arriving here Feb. 17.

Reagan telephoned Ronnie in Florida earlier this month and offered his support after learning of the boy's need for a transplant. Hours after the call, authorities discovered that thieves had stolen $4,000 collected for Ronnie by his classmates.

A nationwide campaign raised more than $400,000 to help pay for the expensive surgery.

Ms. DeSillers, 31, said she lost her health insurance 4 1/2 years ago after she lost her job and couldn't afford to make payments.

The extensive publicity had no effect on the search for a suitable organ and the speed in which Ronnie received the liver, Miss McMahon said.

About 90 children are waiting to undergo a liver transplant at Pittsburgh. Some young candidates wait as long as 1 1/2 years before receiving an organ, and others die waiting, she said.

Around the country, more than 10,000 people are waiting at any one time for organ transplants.

The hospital said last week that Ronnie was the only child on the list with AB type blood.

''I'm certain that all the media attention that Ronnie received, as well as the interest on the part of President Reagan, had absolutely no influence in the donor organ becoming available so quickly,'' Miss McMahon said.

''It was a matter of the urgency of Ronnie's case and the fortunate situation of an AB blood type liver becoming available so quickly.''