Brown accused security of treating his family badly and barring him from visiting with his daughter, an account that Houston's family vehemently denied, according to a family friend.

Brown was seen arriving with several people and had sat down in the front row of a section marked off for family, before being asked to move. Brown had entered the church with other mourners, separate from Houston's family. He appeared emotionally distraught, with red eyes and head hanging as he walked up the aisle of the New Hope Baptist Church in Newark, New Jersey. He approached Houston's casket, passed it and went back down the aisle. Ultimately, he left the church.

Security workers appeared to ask others, including celebrities and government officials, to also change seats to make room for everyone.

"My children and I were invited to the funeral of my ex-wife Whitney Houston," Brown later said in a statement. "We were seated by security and then subsequently asked to move on three separate occasions. I fail to understand why security treated my family this way and continued to ask us and no one else to move. Security then prevented me from attempting to see my daughter Bobbi Kristina.

JUST WATCHED

Cosby: 'Houston's death not a shock'

MUST WATCH

Cosby: 'Houston's death not a shock'01:31

"In light of the events, I gave a kiss to the casket of my ex-wife and departed as I refused to create a scene. ... I will continue to pay my respects to my ex-wife the best way I know how," the statement said.

Brown was expected to attend with two guests but showed up with 10 people, a close friend of the Houston family told CNN on condition of anonymity because of the sensitivity of the issue.

"The family approached Bobby and told him that he could stay in the area reserved for family, but that his guests would need to move to a different section to make room for Cissy (Houston) and the rest of the family," the family friend said. "Bobby said no."

When Brown refused, the family asked police to intervene.

"The police told Bobby that he could stay in the area reserved for family, but that his guests needed to move," the friend said. "Bobby said no, and left with all of his guests."

The family friend maintained that Brown was always invited to the funeral.

"There was never a question of whether he would be invited or not," the friend said.

Describing what happened at the service, the Rev. Al Sharpton posted on his Twitter account: "I am at Whitney's funeral. I spoke with Bobby Brown trying to calm him down and not distract from the services. Today is about Whitney."

Brown was scheduled to perform with his group, New Edition, later Saturday in Connecticut. Brown considers performing as therapy to get him through a difficult time, a source close to him said Sunday.

He and Houston were married from 1992 until 2007, with Houston getting sole custody of their daughter, Bobbi Kristina Brown, when they divorced. Their daughter was born in 1993.

When they married in July 1992, questions arose about whether it was a publicity stunt to help polish Brown's image as a bad boy who had weathered drug rumors and had acknowledged having three children out of wedlock. Houston scoffed at such rumors, saying that anyone who questioned their marriage didn't understand what the commitment meant to her. They married in a lavish ceremony at her New Jersey estate.

In the late 1990s and early 2000s, reports begin to surface about Houston's struggles with drug addiction, health problems and her rocky marriage with Brown. Her album sales dropped, and her voice began to show signs of wear.

In a now-infamous interview with ABC's Diane Sawyer in 2002, Houston admitted using drugs, but denied using crack. "Crack is whack," she said, quoting a line from a mural painted in 1986. In the same interview, Houston said, "The biggest devil is me. I'm either my best friend or my worst enemy."

In 2004, filming began on the short-lived reality show "Being Bobby Brown." "The show aired during the worst years of the couple's crumbling marriage: drug use, lifestyle excess and bad behavior were all caught on tape, and Houston's reputation sunk to new lows," according to Biography.com. Houston later said she did the show to try to save her marriage.

In March 2011, Brown announced that he and his New Edition bandmates were reuniting and planning a new album and tour.

The group -- made up of Brown, Ralph Tresvant, Michael Bivins, Ricky Bell, Ronnie DeVoe and Johnny Gill -- had reunited periodically over the years, with and without Brown.

Brown's music career initially took off with New Edition, which started as an R&B boy band.

He left New Edition in 1986, after hits that included "Candy Girl," "Cool It Now," and "Mr. Telephone Man."

His solo career has included his 1988 multiplatinum album, "Don't Be Cruel," which featured the hit singles "Don't Be Cruel," "Every Little Step," "Rock Wit' Cha," "My Prerogative" and "Roni."