MADRID  Israel has acquired the user name @israel on Twitter, the microblogging Internet service, from the Spanish owner of a pornographic Web site, in an unusual transaction intended to help Israel exercise more influence over its image.

The owner of the user name, Israel Meléndez, got it in 2007, when Twitter was in its infancy. He struggled to use his account, however, because every posting prompted a flood of anti-Semitic or anti-Israel comments from Twitter users, in a case of mistaken identity.

“My account was basically unused because I was getting dozens of replies every day from people who thought the account belonged to the state of Israel,” Mr. Meléndez said.

Yigal Palmor, a spokesman for the Israeli Foreign Ministry, confirmed the purchase. He declined to say how much Israel paid, but he said that “it was not pro bono.”