Rio de Janeiro's cash-strapped state government has announced it is to slash around $500 million from its security budget — less than six months before the city hosts this year's Olympic Games.

The announcement has inevitably created doubts over Rio's ability to guarantee the safety of visitors to the city during the Games. In the light of this week's attacks in Belgium, it has also raised questions over just how prepared Brazil is to deal with potential terrorist atrocities.

Rio has long been troubled by vertiginous crime levels, with over 1,200 homicides in the city in 2015.

And the city's urban violence is not just confined to its notorious favelas. Last month Laura Pâmela Viana, an Argentine tourist, was stabbed to death near the famous Copacabana Palace Hotel in one of the city's most expensive and tourist-friendly neighborhoods.

Rio's public security secretary José Mariano Beltrame has, however, repeatedly insisted that there is nothing to worry about.

"Bring on the Olympics!" he told Brazilian magazine Istoé in an interview in January. "The security part is ready. I think it's our first medal."

Beltrame sounded less bullish yesterday as he announced the cuts, which represent 35 percent of the annual state security budget.

He told reporters they will mean redundancies and reductions in the number of police cars, as well as a trimming of maintenance contracts. Plans to install a UPP, or Police Pacification Unit, in Maré, one of Rio's biggest and most violent favelas which sprawls along the main thoroughfare to the city's international airport, have also been shelved.

Paulo Storani, a former captain in Rio's Special Operations Police and a professor at the city's Cândido Mendes university believes the cuts will have a significant effect on public security in the city, before, during, and after the Olympics.

"The first impact will be in investment on technology and infrastructure," he said. "Then [the cuts will impact] public security, in terms of visible policing such as cars, and police in the streets."

The security cuts in Rio are the result of a statewide financial crisis caused not only by Brazil's economic downturn, but also the crisis gripping the state-run oil company Petrobras. The company bases many of its activities in Rio and this week announced a record $10.2 billion loss for the fourth quarter of 2015.

As well as combatting everyday crime, the Olympics organizers also face a potential problem from rising social unrest linked to both the economic problems and the country's political crisis.

Earlier this month over a million people took to the streets to protest against President Dilma Rousseff's government and her perceived mishandling of the economy at the same time as a major probe has uncovered a massive corruption racket at Petrobras. Last week supporters of Rousseff's governing Worker's Party also marched. Though the numbers were much smaller, they were equally vociferous.

While the demonstrations have so far been largely peaceful, there have been sporadic clashes between militants on both sides and it is unclear how long people will remain calm if the political climate and the national mood deteriorates further.

The cuts also come as terrorist attacks in Belgium have raised fears that extremist groups could plan to disrupt the Olympics. Experts have already stressed Brazil's often porous 23,000 kilometer perimeter, which lacks proper security controls in many remote regions.

"Lone wolves remain the primary terrorist threat to the Olympic Games," said Luiz Sallaberry, the director of ABIN, the Brazilian Anti-Terrorism Department, in an interview with Deutsche Welle last year. "There is no priority area, the threat is diffused all over the Brazilian territory and abroad."

"We are using all means available including our own personnel and methodologies, as well as support from foreign intelligence services and the cooperation of the police and the Ministry of Defense," he continued.

Defense Minister Aldo Rebelo also recently admitted that Brazil was taking the terrorist threat seriously. "Since the Olympics in Munich in 1972, the concern (of a terrorist attack) exists. There was an attack in Atlanta 1996 too. There are many examples in the past."

There are due to be 85,000 security personnel operating in Rio during the Olympics — more than double the numbers on duty during London 2012. The security force will include 47,000 polices, municipal guards, and firefighters, as well as 38,000 soldiers.

"It will be the biggest security operation in the history of Brazil," Andrei Augusto Passos Rodrigues, the Security Secretary for Major Events of the Justice Ministry, announced last year.

Former cop and security expert Paulo Storani, however, believes that despite their promises, the authorities are not taking the potential terror threat seriously enough.

"Brazil has no history of tourist attacks, so they refuse to explore the possibility, because of geographical factors or because people in other countries see Brazil as a friendly country," he said. "But the logic behind the idea that there's less risk because some people think Brazilians are friendly people is absurd."