Story highlights With more than 99% of votes counted, Dilma Rousseff had 51.59% of the vote

Opposition candidate Aecio Neves had 48.41%

The election was one of the tightest competitions in recent years

Brazilian President Dilma Rousseff won a hotly contested runoff election on Sunday.

With more than 99% of votes counted, the incumbent Rousseff had 51.59% of the vote, according to official results. Opposition candidate Aecio Neves garnered 48.41%.

Neves said he called to congratulate Rousseff, who thanked voters on Twitter late Sunday for their support.

The election was one of the tightest competitions in recent years.

Before becoming the country's first female president in 2011, Rousseff, from the Workers' Party, was chief of staff to former President Lula da Silva.

She claims that under the presidencies of her predecessor and herself, masses of Brazilians have risen out of poverty.

Rousseff, 66, presided over the soccer World Cup in Brazil. She took a lot of political flack over how public money was spent.

The President defeated Neves, a 54-year-old economist, who is a well-known name and a career politician. His campaign slogan promised reforms to lower inflation and encourage more investment in the country: "The sure path for Brazil to really change."

The pro-business candidate belongs to the Brazilian Social Democratic Party, one of the country's strongest.