Prime Minister David Cameron agrees with the principle of the Home Office text messages urging people to contact them about their immigration status.
A Downing Street spokesman said: "The point of the texting, which the Prime Minister does agree with, is to get in touch with people who may be here illegally and to say to them ... that they need to be considering going home voluntarily or being removed.
"The principle of the text message is correct. This is one of various means the Home Office uses to get in touch with people who are here illegally to bring about their removal from the UK.
"It's a tiny proportion of texts that may have gone to erroneous people and the wording of the text just says 'you may be here illegally'."
A spokesperson for Capita, who sent the messages at the request of the Home Office, said of the 58,800 people they contacted by text or email between December 2012 and June 2013, just 14 complaints were received claiming they had been sent in error.
"Most complaints occurred in the earlier part of this period where Capita was, as part of the contract, updating sometimes out-of-date Home Office records," the spokesperson added.
The Home Office has denied claims that text messages accusing people of being illegal immigrants are frequently sent to people who have a right to be in the UK.
"We are taking proactive steps to contact individuals who records show have no valid right to be in the UK, some of which date back to December 2008," a Home Office spokesperson said. "We believe it is right to enforce the immigration rules."
The Home Office said private contractor Capita, the firm responsible for the messages, has accepted it sent 14 texts in error out of the 58,800 people suspected of not having a right to be in the UK.
"Out of thousands of people contacted by Capita, a small number have been found to have the right to be in the UK or an outstanding application," the spokesperson added.
Shadow immigration minister David Hanson said Theresa May's immigration system "lurches from one gimmick to another with little effect" following reports people were wrongly sent text messages accusing them of being illegal immigrants.
Mr Hanson said: “The reports that the Government has allowed a private contractor to send British citizens text message telling them to leave the country demonstrates once more just how shambolic and incompetent the Home Office’s border police is under Theresa May.
An anti-racism campaigner said he was "absolutely shocked and quite horrified" to receive a text message from the Home Office warning him he "may not have leave to remain in the UK."
Suresh Grover, founder of The Monitoring Group, told The Independent, "I thought it wasn't meant for me. I came here with my parents in 1966, I was born in East Africa and have always had a British passport."
Mr Grover, who called the number on the text and spoke to someone at private contractor Capita, said: "The more I talked to the woman the angrier I got. She was asking for more personal information about me and was not telling me where she got my number.
"I think it's outrageous sending people random texts without knowing who they are sending them to ... it's horrific."
More than 100 people have complained to the Home Office after they were wrongly sent text messages accusing them of being illegal immigrants and telling them "to leave the UK", The Independent reported.
A Freedom of Information request submitted by anti-racism campaigner Suresh Grover - who also received the message - shows 39,100 individuals have been contacted in this way.
Of those, 103 have complained to the Home Office and 95 complained to Capita, the private contractor that issued the texts.