Oliveira joined Zaragoza in a loan deal from AC Milan and immediately impressed, scoring in his first two games before going on to end the season as the club's top goalscorer.
Zaragoza will be hoping the 28-year-old Brazilian international can fire them straight back into the Primera Liga after they were relegated this season.
"Real Zaragoza have decided to exercise the option to buy that they had for the Brazilian striker Ricardo Oliveira, who last season was on loan from Milan," read a statement on the club's website www.realzaragoza.com.
"In this way Real Zaragoza have the rights to the Brazilian for the next four seasons.
"Oliveira was Real Zaragoza's top goalscorer during the 2007/08 season, scoring 21 times in the league, cup and UEFA Cup."
Zaragoza have paid a reported 10 million euros for the former Real Betis player.