Created by Carter Bays and Craig Thomas, CBS's How I Met Your Mother has been loved by fans and critics alike for its interesting premise, excellent cast, and hilarious writing. While there were plenty of things wrong with the show, there are some of some toxic moments of friendships in the show.

RELATED: 5 Times How I Met Your Mother Was Heartwarming (& 5 Times It Was Heartbreaking)

While most of it is played for comedic effect, Lily Aldrin and Barney Stinson are some of the characters whose behavior is often borderline psychotic, as their actions are quite questionable. While they may be loved by fans, here are 5 times they were some of the most terrible people in the series.

Lily: Dumped Marshall and Left For San Francisco

In the season 1 finale, Lily dumps Marshall and moves to San Fransisco, which might be one of the most selfish things she has done in the show. Even Ted, Robin, and Barney, her best friends, hated Lily because of treating Marshall that way.

Even worse, after moving back to New York, she kept Marshall from having a relationship with Chloe, the barista, in the season 2 episode, "Swarley", and assuming Marshall would beg to take her back.

Barney: Sold a Woman

barney stinson how i met your mother

In the season 4 episode, "Three Days of Snow", Barney apologizes to a girl and tells her he's pretty sure he sold a woman. He "didn't speak the language, but he took the money, and left the girl there".

While this may be a little exaggerated, considering Ted is an unreliable narrator, it was still a horrible and inhumane thing to do, which, to viewers' shock and surprise, is played for laughs.

Lily: Interfered with All of Ted's Relationships

In "Front Porch", viewers find out that Lily has been meddling in all of Ted's relationship since college, breaking him up with some of his girlfriends. Ted gets understandably furious when he finds out Lily broke him and Robin up.

RELATED: 10 How I Met Your Mother Episodes That Will Make You Believe In True Love

Lily, however, defends her actions and says she was in breaking up Ted and Robin, saying they both wanted different kids. While she only wanted to look out for her friends, it does not give her the right to manipulate Ted and his girlfriends.

Barney: Cheated on Nora

Barney and Nora sitting side by side during their break up

After Barney and Nora start dating again in season 7, Robin starts dating Kevin. However, Barney cheats on Nora with Robin. Although he was in love with Robin and wanted to be with her, he shouldn't have cheated on Nora and should have broken up gently with her.

Even worse was the fact that Nora's parents were visiting her at the time (they were right there in the next room) when he confessed to Nora about hooking up with Robin.

Lily: Almost Got Ted Fired

How I Met Your Mother Ted Lily

When Lily takes Hammond Druthers', Ted's boss's, prized baseball, he threatens to fire everyone in the office. Lily reason for taking the ball? Hammond was being mean. Lily could have taken a few steps before petty theft to teach him a lesson.

Even worse, Ted almost gets fired and has to confess to Druthers that Lily took it, which could have easily cost him his job, and this was before Lily tells him that she had also stolen some khakis and gifted them to Ted!

Barney: Steals Ted's Stuff

Barney and Ted

After Robin and Ted decide to move in together, Ted puts all his worldly possessions in a truck, which Barney steals, all because he didn't want Ted and Robin to move in. Not only does he force Ted to jump through hoops all night, but he also refuses to give him his stuff back.

RELATED: 5 Most Annoying How I Met Your Mother Characters (& 5 Everybody Loved)

Even worse, he sets the moving truck as a kind of room, where he planned to bring girls and have sex with them. While it is played for laughs and Ted realizes Barney was kind of right, it was still a creepy and terrible thing to do by someone claiming to be his best friend constantly.

Lily: Hid Her Debt From Marshall

Lily Leaves Marshall

In the early seasons, viewers see that Lily is somewhat addicted to shopping. She keeps buying fancy and expensive clothes, accessories and footwear, which leads to a ton of debt. She also accidentally destroys an expensive wedding dress, which adds to that debt.

Even worse, she hides it from Marshall and convinces him to take a job he hates so he can pay off her debt. She also refuses to sell her old clothes when Marshall asks her to while expecting Marshall to sell off his stuff in a heartbeat.

Barney: Almost Sabotaged Ted's Job

Ted at Barney at the bar in How I Met Your Mother.

After Ted's competitor, Sven, builds a building in the shape of a T-Rex, Barney, instead of vouching for his friend, decides to go with Sven, and all because he wanted to work in an office in the shape of a dinosaur.

RELATED: How I Met Your Mother: 10 Plays In Barney's Playbook That Would Actually Work (& 5 That Are Just Insane)

Not only that, but he also lies to Ted about it, saying he "tried his hardest" to get Ted's design approved, but Bilson voted against him. This is just one of the many selfish things Barney has done to the Ted, who almost got fired from his architecture firm.

Lily: Forced Marshall to Move To Italy

Marshall Lily HIMYM

After Lily takes a job in Italy for a year, she and Marshall decide to move there. However, when Marshall gets the job of his life, becoming a judge in New York, Lily selfishly tells him they're going to Italy, without hearing his side.

While Marshall should have talked to Lily about this, Lily tells him he was being more selfish than she had ever been, quickly forgetting she had dumped him and broken off their engagement to go to San Francisco, which was perhaps the worst thing she has done to Marshall.

Barney: Made Fun of Lily's Play

After Lily invites them to a play she was part of, Barney laughs her off and tells her he's not coming, and when he does show up, he insults her play and tells her it was terrible.

When Lily looks for just a little validation from him, he forces the gang to sit through his terrible play just to prove a point. Lily is still nice to him though, and he guilts them into enduring a few more hours of his play until Marshall has to slap him to make him stop.

NEXT: How I Met Your Mother: 5 Funniest Robin Quotes (& 5 Most Heartbreaking)