The United States has temporarily closed its consular office in the Mexican border city of Reynosa, across from McAllen, Texas, after gunbattles with drug gangs rocked the area this week.

Four suspected cartel gunmen were killed Thursday outside the nearby city of Matamoros after they attacked an army patrol on a highway, Mexico's Defense Department reported.

The department also announced that a series of clashes on Tuesday farther west along the border killed six gunmen and one soldier. Ten soldiers and a police officer were wounded.

The U.S. consulate in Matamoros posted a message on its Web site advising U.S. citizens to be aware of the recent violence.

"The U.S. Consulate General in Matamoros has restricted the travel of American officials to Reynosa until further notice," read to the statement, dated Wednesday. "The Consulate General also has temporarily closed the Reynosa Consular Agency until further notice."