The 53 member states of the UN Commission on Human Rights - including the United States - adopted by consensus a resolution on Thursday to set up the post for three years.
The resolution, proposed by Mexico and co-sponsored by 70 countries, expressed solidarity with victims of terrorism and their families and reaffirmed the commission's "unequivocal condemnation" of terrorism in all its forms as "criminal and unjustifiable".
But it deplored "the occurrence of violations of human rights and fundamental freedoms in the context of the fight against terrorism".
Some countries have allegedly
targeted ethnic or religious groups
It called on states to "ensure that any measure taken to combat terrorism complies with their obligations under international law".
Activists have lobbied since the 11 September 2001 attacks on the United States for the forum to investigate allegations that the "war on terror" has led some countries to target ethnic or religious groups or deprive suspects of their legal rights.
"It is the most important decision of this commission," said Loubna Freih, spokeswoman of the New York-based group Human Rights Watch.
"It is now time to start looking at the issue of how governments around the world - not only the United States - are fighting terrorism and whether they are complying with international law," she said.
Governments including Britain, Canada, Germany and the US, increasingly are transferring terrorist suspects to countries where they risk torture, in violation of international law, Human Rights Watch said in a recent report.
In a joint statement last week, groups including Amnesty International, Human Rights Watch and the International
Commission of Jurists had called for the new post.
"The special rapporteur would monitor counterterrorism laws and practices for their compatibility with human rights, act to prevent human rights violations arising from counterterrorism measures and provide technical assistance to states," they said.
"It is now time to start looking at the issue of how governments around the world - not only the United States - are fighting terrorism and whether they are complying with international law"
Loubna Freih, spokeswoman,
Human Rights Watch
The forum, which winds up its annual six-week session on
Friday, last year appointed an independent expert to draw up a report on counterterrorism.
The expert, Robert Goldman, reported that a "broad range of human rights have come under increasing pressure or are being violated by states in the context of counterterrorism initiatives".
His concerns included the prolonged or indefinite detention of terror suspects without access to courts, inhumane treatment during interrogation, military tribunals to try civilians, and the transfer or rendition of suspects to third states that routinely practise torture.
Some countries have resorted to "profiling" people to identify terror suspects or prevent them from entering their territory.