Mexico has begun training a 4,000-man quick-reaction force designed to defend the country's southern border and lucrative oil fields against a possible spillover of Central America's turbulent guerrilla wars, according to official sources here.

The elite quick-reaction force is the latest stage of a major effort to expand and modernize the Mexican armed forces, which past governments have kept deliberately small and relatively powerless.

In the past three years, the Army has grown by 25 percent to 120,000 soldiers. In August, the first six of 12 F5 jet fighters are due for delivery from the United States. About 100 Mexican personnel are receiving U.S. training on the planes, the sale of which originally was opposed by the Carter administration on the basis of a longstanding U.S. policy against the introduction of sophisticated aircraft into the region.

The Carter administration eventually approved the sale. Although the F5 is relatively low on the scale of sophistication, the $110-million deal will provide a substantial boost for Mexico's antiquated Air Force and provide the first major step beyond the military requirements considered necessary to maintain internal order.

Mexico also has purchased almost 40 Mopard antitank vehicles from France and ordered about 60 Pilatus planes from Switzerland. Although the single-engine planes normally are used as trainers, sources close to the Mexican military said these will be armed for possible combat purposes.

The government reportedly is shopping in the United States for an air-defense radar system.

Both civilian and military officials here are becoming convinced that Mexico cannot escape the shock waves from the south. Informed sources here said the quick-reaction force will have the capacity to respond to a crisis anywhere in Mexico within hours. In particular, it could quickly reinforce troops stationed in the southern Mexican states bordering on Guatemala should that country's escalating guerrilla war spill over the frontier.

Although Mexican foreign policy has tended to be supportive of guerrilla movements in Nicaragua and El Salvador, Mexican officials are known to be increasingly concerned about the situation in Guatemala. The government now estimates that since December, as many as 2,000 Guatemalans per week have sought refuge in Mexico's oil-rich south.

Authorities, fearing that Mexico will become a base for Guatemalan guerrilla activities, or that the Guatemalan military will cross the border in pursuit of the rebels, have increased their patrols in the difficult jungle region. Occasional reports of arms smuggling via Mexico into Guatemala have not been confirmed.

According to one source, the purpose of the quick-reaction force is twofold: "to act against a professional army in a regular war, and to operate in irregular, guerrilla warfare." The force will be distributed at air bases throughout the country, and will have a capacity "to be at the oilfields within three hours." Training now underway includes jungle exercises, paratroop exercises and the use of radar.

Although the Mexican military operated successfully against a large rural guerrilla group in the state of Guerrero in 1973 and 1974, it has not had to confront a sophisticated enemy inside or outside the country for decades. Mexico has long recognized it cannot defend itself against the United States, and does not seriously contemplate attacks from any of its smaller neighbors.

At the same time, sources familiar with military strategy say the country's important oil fields cannot be defended from sabotage or from sophisticated surprise attacks.

But sources who know the thinking of the extremely discreet Mexican military say that the creation of the reaction force and the general military buildup are partly a matter of pride and prestige, and partly a reaction to a sense of uneasiness as turmoil in the region grows.

An official who discussed the quick-reaction force said it was not expected to affect the now established Mexican tradition of separating the military from politics.

In private, Mexican politicians frequently comment that Guatemala, with whom Mexico has tense relations, has a much smaller but more sophisticated and experienced military than Mexico. They also note that while Mexico has become a major oil power with reserves the third largest in the West, and has gained at least regional political clout, its military has not grown accordingly.

Defense spending in 1981 amounted to only 2.5 percent of the national budget, small by regional standards.

"True, the Mexican military is making a leap forward now," one foreign military analyst said. "But to be fair, it's a leap forward from the state they've been in since the 1940s."