NEW BRUNSWICK -- A judge in Middlesex County has approved the name change of a transgender teen, saying the move is in his "best interest" because it matches his gender identity.

Under the ruling, the now-17-year-old, whose parents are divorced, was granted a name change from Veronica to Trevor, according to an opinion from Middlesex County Superior Court Judge Marcia Silva.

"This name change allows the transgender minor child to begin to fully transition into their chosen gender and possibly prevent them from facing harassment and embarrassment from being forced to use a legal name that may no longer match his or her gender identification," Silva wrote in the March opinion, which was published Wednesday.

Trevor's mother filed for the name change on Trevor's behalf in 2016, but his father initially opposed the change, questioning whether or not it was in the 16-years-old's best interest.

During the hearing, the teen testified that he asked to be called Trevor when he was 12-years-old, saying that the boy's name "better represents who he is and the gender with which he identifies," according to the opinion. His father and step-family continued to call him Veronica, he testified.

Trevor has been in therapy for the eventual transition from female to male and has suppressed his menstruation with hormone treatments, according to the ruling.

The teen testified that he "did not like the 'typical girl toys, did not play with dolls and absolutely hated wearing dresses' but he 'loved to play baseball and basketball, skateboard, and rollerblade.' Essentially, Trevor did not conform to the gender norms of a young girl of that age," the ruling states.

According to the court document, the parents said they noticed a change in Trevor's behavior in the sixth grade when he went from a good student to one who was "getting bad grades, lying, vandalizing school property, and fighting."

Trevor was then referred to mental health professionals for his emotional problems after which he announced he was transgender.

"Trevor is committed to living his life as a male," Silva wrote. "To force him to legally keep the feminine name 'Veronica' would not be in his best interest."

Craig McCarthy may be reached at 732-372-2078 or at CMcCarthy@njadvancemedia.com. Follow him on Twitter @createcraig and on Facebook here. Find NJ.com on Facebook.

Have a tip? Tell us. nj.com/tips