We reported over the weekend that How I Met Your Mother star Cobie Smulders was nearing a deal to appear in The Avengers as S.H.E.I.L.D. Agent Maria Hill. Today that deal is being finalized, and Cobie Smulders is officially confirmed to join Joss Whedon's epic superhero ensemble.

Maria Hill is the sidekick of S.H.I.E.L.D. leader Nick Fury (Samuel L. Jackson), a woman known for her aggressive tactics including the blackmail of certain super heroes to get them to cooperate. Cobie Smulders becomes the second female cast member in The Avengers, along with Scarlett Johansson, who plays Natasha Romanoff, a.k.a. The Black Widow.

Our initial report suggested that Cobie Smulders would sign on for multiple Marvel movie projects, including sequels to The Avengers and the S.H.I.E.L.D. trilogy. The actress is now said to be signing a nine-movie deal for future projects.

Joss Whedon is directing The Avengers from his own script. Production will start on The Avengers in April.