FRANKFURT, West Germany (AP) _ Mayor Wolfram Brueck said Tuesday a private adoption agency is ''damaging the basic dignity of mankind'' and will be closed in a week unless it proves it is operating legally.

The Hamel and Keller service sells babies to adoptive parents for a profit.

Private adoption agencies are illegal in West Germany, but Hamel and Keller claims there is a loophole in the law involving a declaration of fatherhood.

Uwe Hamel told The Associated Press after hearing of the city's order: ''I am not concerned about this at all. I will simply continue.''

One of the agency's advertisements reads: ''I can arrange immediately for a child. The prices: 30,000 marks ($18,000) for a child from the Middle East; 15,000 marks ($9,000) for a child from the Far East; 45,000 marks ($27,000) for a German child.''

According to the agency, a prospective adoptive father declares an illegimate child to be his and makes a contract with the baby's mother, who is paid a fee to verify the claim. The man then applies to a court for the child to be declared his legitimate offspring.

Hamel's agency has operated for two months. He claims it has arranged the adoptions of nine babies.