Entertainer Jennifer Lopez's Water Mill home was invaded this month by a man who, unbeknownst to her, had been living for a week in her pool house while she was away, Southampton police said Wednesday.

Lopez had an order of protection against John M. Dubis, 49, of Rhode Island, but he somehow made it onto her property, police said.

Dubis went undetected until workers on Aug. 8 noticed a suspicious male and called police, authorities said.

He was arraigned Aug. 9 on two felonies, second-degree burglary and first-degree criminal contempt, and two misdemeanors, fourth-degree stalking and possession of burglar tools. His next court date is Aug. 28.

Details on why the singer-actress got an order of protection against Dubis were not available Wednesday night.

The suspect was being held in Suffolk County jail on a $100,000 bail, police said. The Southampton Town court ordered an exam to determine if Dubis is "fit to proceed" on the criminal charges, police said in a news release.

advertisement | advertise on newsday

Her publicist could not be reached for comment and it was unclear whether Dubis had an attorney.

Detectives on the case could not be reached Wednesday night, and other details were not available.

Lopez had bought the Water Mill mansion on 3 acres in May for a reported $10 million.

The eight-bedroom, 7 1/2-bath home is on a private cul-de-sac. It comes with a pool, pool house, outdoor shower, sauna, steam room and theater, according to the old listing with The Corcoran Group.