Nick Carter says his brother, Aaron, has left him with no choice but to seek legal protection after he claims Aaron threatened to kill Nick's pregnant wife and unborn child ... though Aaron says he'd never harm family.
According to the temporary restraining order obtained by TMZ ... Aaron has to stay at least 100 feet away from Nick, Nick's wife, their kids and other family members, specifically their residence in Las Vegas.
Nick says both he and his sister were forced to seek the order against Aaron, "In light of Aaron's increasingly alarming behavior and his recent confession that he harbors thoughts and intentions of killing my pregnant wife and unborn child."
A rep for Aaron tells us, "I am astounded at the accusations being made against me and I do not wish harm to anyone, especially my family."
Aaron responded to Nick on social media after he filed the restraining order, saying he should send a cease and desist letter while he's at it. Aaron adds he hasn't seen Nick in 4 years, and they ain't planning on a reunion.
As we've reported ... Aaron's family has been super concerned with his mental state lately, and the singer has raised concerns over his own mental stability.
Nick says, "We love our brother and truly hope he gets the proper treatment he needs before any harm comes to himself or anyone else."
Aaron appeared on "The Doctors" and at least from the show, it seemed like he's suffering from anxiety, schizophrenia, multiple personality disorder and manic depression -- another term for bipolar.
L.A. County Sheriff's deputies recently went to Aaron's Lancaster, CA home for a welfare check ... and he claims they visited him again over the weekend and tried to place him on a 5150 psychiatric hold.
Aaron's been flaunting his gun collection -- he says he owns a 9mm handgun, 2 assault rifles and other firearms -- and we've learned cops are looking into an obscure law that could be used to take his guns away.
Aaron came on "TMZ Live" Tuesday disputing the notion he's struggling with his mental health, and telling his family to leave him alone.
Clearly, the feeling is mutual.
A hearing for a permanent restraining order has been set for October 16.