Military officials in Pakistan at first said helicopters fired missiles into Pakistani territory, and that officials had opened an investigation into whether U.S. aircraft were involved.
But Maj. Gen. Shaukat Sultan, Pakistan's top army spokesman, later Monday said no missiles had landed in Pakistan. He did say that three Pakistani tribesmen were wounded on the Afghan side of the border and were taken to a hospital.
Lt. Col. Paul Fitzpatrick, a U.S. military spokesman, said the strike was one or two miles inside the Afghan border.
A U.S. military statement said coalition forces were in direct communication with Pakistani forces on the other side of the border during Monday's operation.
Past U.S. strikes into Pakistan's territory have strained relations between the two countries.
"It was close to the border, within a kilometer (mile) or two. But we have GPS (global positioning systems). We know where the borders are of the two counties," he said.
Before the strike, a joint team of U.S. ground forces and Afghan soldiers observed individuals loading a truck near the cave with rockets, a military statement said.
A patrol sent to investigate after the strike was fired on by one militant, who was captured, the U.S. military said.
More militants could be buried under the rubble in addition to the four militants known to have been killed, the military said.
The American military has previously fired munitions into Pakistani territory, straining relations between it and its partner in the war on terror.
A failed Jan. 13 U.S. missile attack aiming to take out Al Qaeda No. 2 Ayman al-Zawahiri in the remote northwestern Pakistani town of Bajur killed the fugitive's relative and about 15 others, including a dozen residents.
Pakistan has maintained it wasn't given advance word of the airstrike, which the Americans have yet to confirm.
Many Pakistanis viewed the attack as a violation of the nation's sovereignty. Pakistan's Foreign Ministry lodged a protest with the U.S. and demanded no such attacks be launched again.
The Pakistan-Afghan border, which runs through rugged mountains and deserts, is unmarked in places, and gunfire and bombs fired by U.S. soldiers and fighter jets in Afghanistan have landed in Pakistani territory in the past.