After the battle of Monterrey, Davis was ordered to collect the signed armistice papers from the defeated Mexican commander, General Ampudia. Johnston decided to accompany Davis but his army uniform had been ruined in transit to Mexico, so Johnston was wearing a red flannel shirt, blue jeans, and a low-crowned felt hat - the typical outfit of a Texan.
When Davis and Johnston entered Monterrey, the civilians and soldiers became agitated at the sight of a Texan, whom the Mexicans hated, and the tension in the streets escalated. The Mexican soldiers refused to let Davis and Johnston pass through to Ampudia's headquarters and guns were leveled.
Ampudia's Adjutant-General appeared on the scene but turned around sensing the hostility of the situation. Johnston blocked the officer's escape with his horse and effectively held him hostage. The officer ordered the soldiers to stand down and escorted Davis and Johnston through to Ampudia's headquarters.
So Johnston's outfit probably provoked the whole scene, but his quick thinking saved the two Americans.