SIERRA BLANCA, TEX., JULY 2 -- Border Patrol agents in this West Texas town made a routine check of a freight train at dawn today and discovered a dark little hell -- 18 dead Mexican men who had been trapped inside a locked boxcar that was supposed to be their secret passage to work and opportunity in America.

"They died of asphyxiation," said Border Patrol spokesman Michael Williams in El Paso. "It was a horrendous sight. Many of them had had heat convulsions, and they ripped off their clothes in desperation. There was a lot of blood inside the car."

The victims included 16 undocumented aliens, most from the adjacent states of Zacatecas and Aguascalientes in central Mexico, and two other men who were said to be smugglers trying to sneak the immigrants into the U.S. interior. One man, 24-year-old Miguel Tostado Rodriguez, survived and said the men "knew that they were in trouble the minute the door was closed," according to Williams.

He said that Tostado Rodriguez was barely conscious when he was rescued and that he told authorities that he heard the last moans of the others a few hours before the agents arrived.

"I could hear {the survivor's} pleas for help, 'Please help us. We need help!' " said Stanley Saathoff, Border Patrol supervisory agent. "I opened the door and saw him standing at the end of the door. He was very wet and in his underwear, crying some, visibly shook."

Freight trains are a common means of transportation used by undocumented immigrants trying to cross the border. According to M.S. Dudley, the chief Border Patrol agent in this town of 3,000 about 70 miles southeast of El Paso, the victims had been sealed in the Missouri Pacific boxcar for about 14 hours.

They apparently entered the car at 5 p.m. Wednesday in the El Paso freight yard about a mile from the Rio Grande, were locked in and were not discovered until about 7 a.m., when Dudley's men checked the eastbound train. Agents in El Paso said that at least 20 other aliens had been caught trying to board the train in El Paso.

The boxcar had been locked from the outside. Officials said they suspected that a third smuggler locked the car so that the passengers might avoid detection when it made its first stop here on its way east.

Temperatures in West Texas have hovered near 100 degrees all week. The high Wednesday in El Paso was 102. The only source of relief in the boxcar, according to officials, was a small hole in the floor, which Tostado Rodriguez, the survivor, managed to carve for himself with a spike.

The tragedy happened at a time when illegal immigration appears to have dropped dramatically on the Texas-Mexico border. Border Patrol agents said 25,300 apprehensions were made in El Paso in June 1986 compared to fewer than 20,000 last month. In McAllen, Tex., 10,000 apprehensions were made in June 1986 compared to 5,000 last month.

Federal immigration officials attribute the decrease partly to the immigration law passed last November. The law allows illegal residents who arrived in the United States before 1982 to apply for legal status, but it imposes stiff penalties on employers who hire undocumented immigrants who do not qualify for amnesty.

Railroad officials said a series of unusual events led to the deaths of the 18, including the fact that they hid in a boxcar specially insulated to haul beer at a constant temperature. Track repairs and several westbound trains also delayed the eastbound freight train before it arrived here, where a Border Patrol inspection was planned.

Officials said the men, whose bodies have been taken to the El Paso County morgue, probably would be alive if they had hidden in a standard boxcar. Air inside the insulated car remained at the temperature of the outside air at the moment the doors were closed, about 103 degrees, and the heat apparently did not abate despite a trip through the cooling desert night.

Officials speculated that the temperature could have increased from the body heat of 19 people. And although the car was not completely airtight, air would grow short in an insulated car.

Alex Tice, a spokesman for Union Pacific Railroad, which includes the Missouri Pacific line, said the train left El Paso at 9:30 p.m. and was delayed by track maintenance work. It had to take the siding several times to wait for westbound trains to pass. The delays forced the railroad to send a new crew to relieve the original crew at 6:30 a.m. at McNary, Tex., west of here, delaying it further.

Agents who met the train decided to check the boxcar because it was locked from the outside but did not have a metal seal to indicate that a loaded car has not been tampered with. Tice said smugglers sometimes lock car doors and place seals on them to avoid suspicion, and give the immigrants implements to dig their way out through the wooden floors.

Many Border Patrol agents said a tragedy of this magnitude was inevitable. Once or twice a month, from Brownsville in southern Texas out to the Pacific coast, agents catch groups of aliens stuffed inside boxcars or in the back of trucks. Usually, they are found in time.

The last such tragedy was in the Rio Grande Valley in October 1983 when four undocumented men died in the back of an 18-wheel refrigeration rig. The victims were among 50 men and women found inside the truck by Border Patrol agents in the town of Pharr in southeastern Texas.

"That one could have been worse, but the other people managed to open the back and get out," said E.J. Vickery, assistant Border Patrol chief in McAllen. "A disaster is bound to happen as long as smugglers continue to treat people as human cargo. Their only care is not to be detected."

Staff writer Don Phillips contributed to this report.