WALNUT CREEK, CALIF., JULY 25 -- Commerce Secretary Malcolm Baldrige died tonight following three hours of emergency surgery to stop massive abdominal bleeding after a horse he was riding while practicing for a calf-roping competition reared up and fell on him.

Dr. Naran L. Patel, a surgeon at John Muir Memorial Hospital who operated on Baldrige, said he was unable to stop bleeding from extensive injuries to the entire abdominal area. Baldrige, 64, died at 3:50 p.m. local time of "extensive bleeding and cardiac arrest."

Baldrige's heart stopped twice, first at the private Contra Costa County ranch where he was injured and again in the operating room of the hospital, where he was taken by helicopter.

"His injuries were from a blunt trauma," said Dr. Ronald LaPorta, a trauma surgeon and chief of surgery at the hospital. "I guess it was the work of the saddle. He had a very large belt buckle that was on his abdomen that must have been hit by the horn of the saddle . . . . Now whether the belt buckle did it or not, I have no idea," LaPorta said.

"We were not able to control the hemorrhage from these injuries," La Porta said, "and his blood pressure slowly crept down, and he eventually had a cardiac arrest."

Baldrige pushed hard throughout his six-year tenure against unfair trade practices that hurt American sales abroad. He was often called the leading protectionist in the Reagan administration -- a description that he rejected as untrue. But under the pressure of six years of record trade deficits that sapped the United States' economic growth, he played a major role in changing the administration's from an ideology of free trade to a policy of pressing for fair trade.

President Reagan said Baldrige had played a key role in the "rebirth of our country's prosperity."

"He was a loyal member of the Cabinet whose common-sense wisdom and counsel I relied on often and deeply valued," the president said.

Baldrige had been revived by cardiopulmonary resuscitation from firefighter Wally Partridge and Dr. Bert D. Johnson, a Stanford University gynecologist, who were at the ranch where Baldrige was practicing team calf-roping in preparation for competition in a rodeo tonight.

Baldrige, a former rodeo champion who had been installed in the Rodeo Hall of Fame in 1984, had successfully roped the hind legs of a calf when the horse he was riding reared and fell over backward. Baldrige remained in the saddle and was crushed under the weight of the horse, according to Bert Kreitlow, a reporter for the Pittsburg (Calif.) Post-Dispatch.

Dr. Bruce Baldwin, director of emergency services at the hospital, which is the county's trauma center, said Baldrige arrived "in profound shock. The horse either stepped on him or rolled over him . . . causing serious injuries to the abdomen and possibly the chest."

Bob Holman, a reporter with KCBS Radio in San Francisco, told United Press International that he assisted as firefighter Partridge twice failed to get a reading while taking Baldrige's blood pressure. The secretary's breathing was labored, and there was only a faint pulse, he said.

Johnson examined Baldrige and ordered cardiopulmonary resuscitation, saying, "We've got cardiac arrest," Holman said.

Andy Swartzell, a nurse with the air rescue team that carried Baldrige from the scene of the accident to the hospital, said the helicopter arrived between 10 and 15 minutes after the secretary was injured. Baldrige was speaking at the time but unable to respond appropriately to simple questions, according to Swartzell, one of three nurses on the team.

Swartzell said the nurses examined Baldrige, and, believing that he had suffered major internal injuries, loaded him onto the helicopter for the six-minute ride to the hospital. En route, they gave him oxygen and an intravenous solution and his condition appeared to improve by his arrival at the hospital.

Baldwin said Baldrige had arrived at the hospital "coherent, he was having a great deal of difficulty breathing . . . . Primarily what he told us was he was in severe pain."

Baldrige was taken into surgery about 30 minutes after his arrival at the hospital, Baldwin said.

Later, when the hemorrhaging could not be stopped, LaPorta said, Dr. Murray Sheldon, a thoracic surgeon, opened Baldrige's chest and administered internal cardiac massage, but the massage was not effective, and Baldrige died at 3:50 p.m. (6:50 p.m. EDT).

An autopsy will be performed by the Contra Costa County coroner's office in Martinez.

"The nation has suffered a great loss with the tragic and untimely death of Secretary Baldrige," President Reagan said in a statement released by the White House. "An experienced businessman and respected community leader, he was a talented and dedicated public servant who thought nothing more than to make a contribution to America and indeed he did. Under his stewardship, the Department of Commerce played a key role in the rebirth of our country's prosperity and all of us owe a great debt to Mac Baldrige.

"He was a loyal member of the Cabinet whose common-sense wisdom and counsel I relied on often and deeply valued. Mac and I shared a special affinity for the West and I will greatly miss his friendship," the president said.

"Nancy and I are truly saddened and extend our deepest sympathy to Midge and the Baldrige family. They will be in our thoughts and prayers in the time ahead."

Baldrige's death leaves the Reagan administration without one of its leading trade strategists at a crucial time domestically and overseas. Along with U.S. Trade Representative Clayton Yeutter and Treasury Secretary James A. Baker III, Baldrige played a major role in trying to steer congressional action on trade away from protectionism and into a fair trade mode. He was well-liked on Capitol Hill because of his straightforward manner and his early advocacy of a tougher line against countries that didn't play fair in trade.

At the same time, his department was amid critical negotiations with Japan over two important high-technology trade issues. One is the ticklish job of recommending the lifting of sanctions imposed on Japan for failing to keep a semiconductor trade agreement. The other is sanctions that may be ordered by Congress against Toshiba Corp. for selling computerized milling machinery to the Soviet Union that allowed Moscow to make its submarines quiet enough to evade detection by U.S. sub-chasers.

According to B.J. Cooper, Commerce Department spokesman, Baldrige had flown to California to ride in a rodeo with his friend and roping partner, Jack Roddy. The accident occurred at Roddy's ranch, east of San Francisco, just as Baldrige and Roddy had finished roping the calf.

Cooper said Baldrige's widow, Midge, was in Washington and had been in contact with the hospital.Staff writers Barbara Vobejda and Stuart Auerbach contributed to this report.