Avenging Spirit, known in Japan as Phantasm (ファンタズム?), is a 1991 2-player platform arcade game developed and published by Jaleco.
During a walk with his girlfriend, the player is ambushed by agents of a mysterious crime syndicate who take his girlfriend away and shoot him to death. Now, as a wandering spirit with the ability to possess most others, he is summoned by his girlfriend's father (who researches ghost energy) and is given a mission to save her from the mysterious crime syndicate that holds her hostage, enabling the player to rest in peace.
As it turns out, the crime syndicate is also researching ghost energy, and they kidnapped the girl in an effort to force her father to cooperate with them. The player must fight through 6 stages to infiltrate the evil syndicate's base, collecting three keys on stages 2, 5, and 6. If the player has all three keys upon reaching the final leg of Stage 6, he can open the girl's cell and possess her to help her fight her way out. If not, he must abandon her and face the syndicate's leader alone. After the syndicate's leader is defeated, the base blows up, and the player ends up on a grassy field as his spirit's power fades. If the player failed to save the girl she [probably] dies in the explosion and [he] expect to see her in afterlife as he fades away. If the player did save her, she comes to on said grassy field, and the player expresses a wish for her future happiness as he vanishes.
Source: Wikipedia, "Avenging Spirit", available under the CC-BY-SA License.