This story was written by Farhan Bohkhai, reporting for CBS News in Pakistan.

Pakistan's military ruler, Gen. Pervez Musharraf, announced plans Friday to begin erecting a fence along the country's border with Afghanistan – a step that's likely to trigger controversy between the two countries which both support the U.S.-led war on terror.

Speaking to foreign and Pakistani journalists at his residence in Rawalpindi – the main military garrison town in a suburb of the capital, Islamabad – Musharraf said Pakistan remained dedicated to fighting Afghanistan's resurgent Taliban movement and al Qaeda.

His remarks appeared aimed at the Western world, including the United States, where officials have privately expressed skepticism in recent months over Pakistan's support for the war on terror. Senior officials from NATO countries have also been concerned about what they cite as evidence of Taliban fighters using Pakistani soil for regrouping in between attacks on Western forces in Afghanistan.

Get Breaking News Delivered to Your Inbox

Musharraf refuted charges that the Pakistani intelligence services or the country's military were involved in aiding and abetting the Taliban but said paramilitary border guards at times may have allowed suspects to cross over, in situations where they were clearly outnumbered by the militants.

Musharraf said mines would not be laid along the border for the time being, following concerns from the international community over a Pakistani plan to do so. But he said Pakistan would go ahead with plans to build a fence along a 150-mile stretch of the border between Pakistan's Baluchistan province and Afghanistan, as well as along a 20-mile stretch between Pakistan's northwestern frontier and Afghanistan.

The plan appears to be a less ambitious version of the original plan to erect a fence along more than 1,200 miles of the border. After the plan was announced, Afghan government officials criticized it for creating obstacles to the free flow of legitimate refugees between the two countries. The Afghans have also opposed the plan on the grounds that Afghanistan has not accepted a part of the border demarcation, decades after it was established by a British colonial officer when Britain ruled over the areas that now constitute Pakistan.

In a clear rebuttal of criticism from Western officials, Musharraf said, "No one has the right to criticize unless they come up with an alternative solution. If there is no (other) solution, we will do it our way." He was responding to Western opposition to a controversial peace agreement last summer with tribesmen along the Afghan border, who were the target of a two-year Pakistani military deployment aimed at wiping out militant suspects from the area.

Musharraf ordered a withdrawal of Pakistani military troops from the border region after local tribal chiefs agreed to assume security duties and stop anyone from heading into Afghanistan to fight Western troops in that country. But Western diplomats said such agreements were likely to give more freedom to militant suspects to cross the border with relative ease.

On Friday, a senior Western diplomat in Islamabad said Musharraf appeared driven by Western pressure to clear Pakistan's name. "Ultimately, the test of Pakistan's commitment to help tackle the militants in Afghanistan would be seen through future trends driving militancy," the diplomat said.

Speaking to CBS News on the condition that he not be named, the diplomat said, "What needs to change is the extent of violence in Afghanistan. Surely there are factors (which drive the violence) on the Afghan side, but there are factors on the Pakistani side, too."

By Farhan Bokhari