For a burglar, being chased by the police is one thing. But finding them already there when you jemmy open the window just doesn't seem fair.

That was the shock awaiting a couple of thieves who staged a midnight raid on a Melbourne house last week.

But the police weren't waiting for them - in fact, they were no less surprised.

The Melton property was allegedly being used for growing hydroponic cannabis, and the detectives were on a raid to arrest the resident, a man in his 20s.

The startled burglars fled, but were caught a couple of days later, said Det Sen-Sgt Paul Cassidy, of Melton CIU.

"It is unusual," he said.

He would not say whether the burglars had been after money or drugs.

The three arrested men, all in their 20s, have been remanded to appear in court.