Obi-Wan Kenobi (later known as Ben Kenobi) is a fictional character in the Star Wars universe, played by Sir Alec Guinness and Ewan McGregor. In the original trilogy, he is a mentor to the protagonist Luke Skywalker to whom he teaches the ways of the Jedi. In the prequel trilogy, he is a master and friend to Anakin Skywalker. In the sequel trilogy, he appears to Rey as a voice in a dream-like-flashback in Maz Kanata's castle. He is frequently featured as a main character in various other Star Wars media.