(Reuters) - Almost a week after being shut down for spewing racist and sexist comments on Twitter, Microsoft Corp’s artificial intelligence ‘chatbot’ called Tay briefly rejoined Twitter on Wednesday only to launch a spam attack on its followers.

The incident marks another embarrassing setback for the software company as it tries to get ahead of Alphabet Inc’s Google, Facebook Inc and other tech firms in the race to create virtual agents that can interact with people and learn from them.

The TayTweets (@TayandYou) Twitter handle was made private and the chatbot stopped responding to comments Wednesday morning after it fired off the same tweet to many users.

“You are too fast, please take a rest...,” tweeted Tay to hundreds of Twitter profiles, according to screen images published by technology news website The Verge.

The chatbot also tweeted that it’s “smoking kush,” a nickname for marijuana, in front of the police, according to British newspaper The Guardian.

Tay’s Twitter account was accidentally turned back on while the company was fixing the problems that came to light last week, Microsoft said on Wednesday.

“Tay remains offline while we make adjustments,” a Microsoft representative said in an email. “As part of testing, she was inadvertently activated on Twitter for a brief period of time.”

The company refers to Tay, whose Twitter picture appears to show a woman’s face, as female.

Last week, Tay began its Twitter tenure with a handful of innocuous tweets, but the account quickly devolved into a stream of anti-Semitic, racist and sexist invective as it repeated back insults hurled its way by other Twitter users.

It was taken offline following the incident, according to a Microsoft representative, in an effort to make “adjustments” to the artificial intelligence profile. The company later apologized for any offence caused.

Social media users took to Twitter to comment on the latest spate of unusual behavior by the chatbot, which was supposed to get smarter the more it interacted with users.

“It wouldn’t be a Microsoft product if it didn’t crash right after it booted up,” tweeted Jonathan Zdziarski (@JZdziarski) on Wednesday.

Andrew Smart (@andrewthesmart) tweeted, “To be honest, I am kind of surprised that @Microsoft did not test @TayandYou more before making it public. Nobody saw this coming!?!”

According to its Twitter profile, Tay is “an artificial intelligent chatbot developed by Microsoft’s Technology and Research and Bing teams to experiment with and conduct research on conversational understanding.”