Dr. Seth Ember (Aaron Eckhart) is able to save Cameron (David Mazouz) and pull the demon entity "Maggie" into his own body. He then jumps out the window to kill himself and take Maggie with him.
Paramedics are called and they are able to momentarily restart Ember's heart. His finger touches Camilla (Catalina Sandino Moreno). As he flat lines and dies, Camilla's eyes turn blood red, signifying that "Maggie" has possessed her (via the touch) and thus ultimately won.
Thanks Tim (Spectre)!