Loki's tragic death also happens in the opening sequence of the film. After Thanos gets ahold of the Tesseract (which holds the Infinity Stone known as the Space Stone), Loki swears his loyalty. Except he doesn't swear his loyalty at all. He secretly pulls out a blade in an attempt to kill Thanos, and Thanos responds by strangling him to death. He also says something like, "No more resurrections." Harsh.