Three men with a gun burst into a house in Bournemouth and demanded money after knocking on the door, police said.
A man in his 40s had answered the door at his home in Salisbury Road, Boscombe, in the early hours of Sunday to find the men - one carrying a gun.
There was a struggle, during which the man's girlfriend returned home and the intruders left empty-handed.
The homeowner sustained cuts and scratches but was not seriously injured, police said.
The gun may have been a BB-type gun, a spokesperson for Dorset Police added.
Det Con John Hicken, of Bournemouth CID, said: "This was a very frightening ordeal for the victim and his girlfriend and we are making every effort to find those responsible.
"Officers from the Neighbourhood Policing Team will be carrying out high-visibility patrols over the coming days to reassure the community and offer support and advice."