FREMONT (CBS  SF) — A San Leandro man was arrested Monday afternoon in Fremont following a standoff in which he dragged a K-9 into a home that he tried to burglarize, police said.

Robert Lomack, 23, was arrested at 2:08 p.m. after he was caught trying to burglarize a home in the 4400 block of Faulkner Drive.

READ MORE: Storm Door Swings Open; Fronts Stack Up In Pacific Heading Toward The Bay Area

A landscaper had noticed a suspicious person in the backyard of a neighboring home. The person was allegedly banging on and looking into windows.

Police said the person allegedly broke a bedroom window at the rear of the home and was able to get in.

The landscaper walked to the front of the home and spoke with a resident who called 911 at 1:42 p.m.

When officers arrived they surrounded the home and at 1:55 p.m. they allegedly saw Lomack emerge from a rear door.

When Lomack saw police, he allegedly went back in the house and tried to leave through the front door.

Police said when Lomack again saw officers he went back in the house. He allegedly tried again to leave through the back door and when he saw officers he retreated into the home but left the door ajar.

Police deployed a K-9, which grabbed Lomack but Lomack pulled the dog inside the house and closed the door.

READ MORE: Rain Helps Firefighters Battling Estrada Fire In Santa Cruz County

Fremont police K9 Cairo (Fremont Police Department)

Police said Lomack reappeared at the back door with an object in his hand that he pointed at officers as if he had a gun.

Lomack allegedly went back in the home but again went to the door pointing the object at officers as if he wanted police to shoot him.

Police said officers realized the object was not a gun and told their peers.

Lomack allegedly went back in the house and closed the door with the K-9 inside. Police finally persuaded him to surrender.

Police said witnesses positively identified Lomack and he was taken to a hospital for the treatment of a dog bite.

The dog was not injured.

Lomack will be booked into jail on suspicion of residential burglary, resisting arrest as well as an active felony no bail residential burglary warrant from 2016.

MORE NEWS: Mountain Lion Sighting Triggers Rohnert Park Middle School Lockdowns

© Copyright 2018 CBS Broadcasting Inc. and Bay City News Service. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.