An 8-year-old boy with dreams of becoming a judge has passed a law school entrance exam — shocking Brazil's legal profession and prompting a federal investigation.

The Universidade Paulista, a multi-campus private university, acknowledged that Joao Victor Portellinha de Oliveira had passed the entrance exam and that it initially enrolled him. But he was turned away from classes when he showed up on Thursday with his father.

The school said that the fifth grader has to graduate from high school before he can enter the university.

The university said one of its employees erred in accepting Oliveira's enrollment and said it would return his fees to the family.

"I think they should have been more considerate," the boy's mother, Maristela, told the UOL news Web site. "At least they should've allowed him to visit the college's facilities."

The Brazilian Bar Association said the boy's achievement should be a warning about the low standards of some of the nation's law schools.

Education Minister Fernando Haddad expressed concern and said he had ordered an investigation.

Oliveira is two grade levels ahead of normal for his age — but his mother says he's not a cloistered genius.

"He is a regular boy," she told the Folha de S. Paulo newspaper. "He is very dedicated, likes to read and study, but he has fun and makes friends."

The school earlier said the "student's performance, considering his age and level of education, was good, especially in the essay test, which revealed his good capacity to express himself and handle the language."

"My dream is to be a federal judge," the boy said, according to Globo TV's Web site. "So I decided to take the test to see how I would do ... It was easy. I studied a week before the test."

Brazil requires every student to take an entrance exam before being admitted to college. Each university administers its own test, and the exams from private institutions are usually considered to be easier than those of public universities, which are free and attract more candidates.

University officials said they could not release figures on the number of people who pass and fail the law school entrance exam.