Montreal police said Friday some officers made a mistake when they went undercover dressed as homeless people to try to catch drivers texting or talking on cellphones.

Earlier this week in the east end boroughs of St-Leonard and Anjou, undercover officers dressed as panhandlers approached motorists at intersections.

If the officers saw drivers using cellphones, they would identify themselves as police and issue tickets.

Montreal police spokesperson Ian Lafrenière said officers were acting on their own initiative.

"The initiative [to seek] out people committing that bad habit was good — but the way of doing it was inappropriate...That's not going to happen again," said Lafrenière.

He said officers may go undercover in future to catch texting drivers, but they won't disguise themselves as homeless people.