John F. Baker Jr., a retired Army master sergeant who was awarded the Medal of Honor during the Vietnam War for rescuing wounded soldiers from an ambush and leading a daring counterassault, died Jan. 20 at a hospital in Columbia, S.C. He was 66.

He had a heart ailment, said his wife, Donnell Baker.

Standing 5 feet 2 inches tall and weighing 105 pounds, Sgt. Baker made up for his diminutive stature by building up his physique. Inspired by his father’s work as a circus trapeze artist, he joined a gymnastics squad in high school and trained on the rings, learning to execute a perfect iron cross.

Accepted by the Army during the Vietnam War — the Marine Corps said he was an inch too short — Sgt. Baker’s impressive strength helped him save the lives of his fellow soldiers.

On Nov. 5, 1966, Sgt. Baker’s unit was tasked with reinforcing a group of American soldiers pinned down near Dau Tieng, close to the Cambodian border. About 3,000 Vietnamese had taken positions in the surrounding jungle, hiding in underground bunkers and roping themselves to tree branches.

As the U.S. soldiers advanced, the lead scout was shot in the face.

The jungle erupted in enemy fire. Camouflaged machine gun positions spit bullets that whizzed by Sgt. Baker’s head. Mortar rounds thumped the ground. Snipers in the trees picked off Americans hiding on the ground.

Sgt. Baker ran toward the front with another soldier and helped destroy two enemy bunkers. During the attack, the other soldier was mortally wounded. Sgt. Baker killed four enemy snipers before carrying his comrade away from the ambush.

Returning to the battle, Sgt. Baker was blown off his feet by an enemy grenade but recovered to make repeated trips through withering fire to evacuate wounded American soldiers much larger than himself. By the end of the two-hour conflict, Sgt. Baker’s uniform was soaked in the blood of his comrades.

In all, Sgt. Baker was credited with recovering eight fallen U.S. soldiers, destroying six bunkers and killing at least 10 enemies.

As his Medal of Honor nomination was considered, Sgt. Baker spent the rest of his tour as a “tunnel rat.” Armed with a flashlight and pistol, he explored the spider- and scorpion-infested subterranean network used by Viet Cong guerillas. During one mission, he discovered a full-scale hospital complete with surgical suites buried three stories below ground.

Returning home in August 1967, Sgt. Baker served as a drill instructor. One day, he was told he had an urgent phone call. It was President Lyndon B. Johnson on the line, inviting him to the White House to be awarded the Medal of Honor, the military’s highest decoration for valor.

According to his citation, “Sgt. Baker’s selfless heroism, indomitable fighting spirit, and extraordinary gallantry were directly responsible for saving the lives of several of his comrades, and inflicting serious damage on the enemy.”

Joining Sgt. Baker at the ceremony in the East Room was his company commander, then-Capt. Robert F. Foley, who also was awarded the Medal of Honor for bravery during the same battle that November day in 1966.

Foley, who retired from the Army as a lieutenant general in 2000, stood 6-foot-7 and played basketball at the U.S. Military Academy at West Point.

Noticing the soldiers’ disparate heights, Johnson told Sgt. Baker and Foley that they reminded him of the cartoon characters Mutt and Jeff.

John Franklin Baker Jr. was born Oct. 30, 1945, in Davenport, Iowa, and was raised in Moline, Ill.

After being awarded the Medal of Honor, Sgt. Baker traveled the country as a recruiter. His repeated requests to be sent back to Vietnam for combat duty were denied. He retired from the military in 1989 and later worked at a Department of Veterans Affairs hospital in Columbia, S.C.

His first marriage, to Ruth Ann Smith, ended in divorce. Survivors include his wife, Donnell Brazil Baker of Columbia; a son from his first marriage, John F. Baker III of Fort Myers, Fla.; and two grandchildren.