The incident took place in the Södermalm neighbourhood in Stockholm on Wednesday last week.
“We were called to [the apartment] due to a complaint that he was trying to break through the door,” Viktor Adolphson, commanding officer with the police in Södermalm told TT.
The man's girlfriend, who is 35 years old, received injuries during the incident to the extent that police decided to open an investigation into attempted murder, according to the news agency.
He was arrested later the same evening, but was released the following afternoon, according to the report.
He was then arrested again at the same apartment on Thursday evening.
“I heard on police radio an alert that the man was back at the same address and a patrol was promptly despatched there,” Adolphson said.
The woman was not at the location on the second occasion. The man was arrested for other offences including theft and damage and was kept at the police station overnight on Thursday.
“I don't think [police] prosecutors should routinely detain people, but in this case it seems as though there was a very good basis for it,” Adolphson said.
The case against the man was strengthened on Friday and he remains in police custody, TT reports.
Police prosecutor Marina Chriakova told the news agency that the type of charge to be raised against the man was not yet “100 percent” certain.
Chriakova added that she was unable to give further detail as to why the man was initially released.
“I cannot go into it. There was a reason for his release, but I cannot give further detail,” she said.
“There is always a risk that this can happen but we cannot detain people unless we have a reason for it, and at that point I had no reason,” she added.
Olga Persson, general secretary of the Unizon umbrella organisation of over 130 women's shelters, said that such situations can endanger women's lives.
“During the period after a woman contacts police or social services, after she has broken her silence, that's when it can be really dangerous for her,” Persson said.
Police prosecutors must be better at seeing warning signs and prioritising resources accordingly, she added.
“Custody [of suspects] is necessary if there is a risk of ongoing violence or if the perpetrator is considered to be likely to disrupt or prevent the investigation, and when it comes to violence by men against women with whom they have close relationships, that is what happens,” the women's rights organisation leader continued.
“We have some of the world's best women's rights laws, I really believe they can be applied in their current form, but people must do their jobs,” she said.