The Blue Sword

The Blue Sword is a fantasy novel written by American author Robin McKinley. It follows Angharad "Harry" Crewe, a recently orphaned young woman, to a remote desert outpost in colonized Damar, where her brother is stationed in the Homeland military. When she meets Corlath, the mystical king of the Damarian Hillfolk, Harry discovers her own magical powers and a destiny that leads her to save Damar from invasion.
"The Blue Sword" was first published in 1982 by Greenwillow Books. It received the Newbery Honor Award, the Horn Book Fanfare award, the ALA Best of the Best Books for Young Adults award, the ALA Notable Children's Book award and the ALA Best Fiction for Young Adults award.
McKinley published "The Hero and the Crown," a prequel to "The Blue Sword", in 1985.
Plot summary.
From the publisher.
This is the story of Harry Crewe, the Homelander orphan girl who becomes Harimad-sol, King's Rider, and heir to the Blue Sword, Gonturan, which no woman had wielded since the legendary Lady Aerin herself bore it into battle.
Synopsis.
After the death of her father, Angharad "Harry" Crewe joins her brother Richard in Istan, a remote military outpost of the colonial power known as the Homeland. Soon after her arrival, she is kidnapped by King Corlath of the independent Hillfolk people of Damar.
Corlath had initially intended only to warn the Homelanders of an impending invasion by the demonic tribes of the North. After his warning is ignored, his "kelar" (a hereditary magical power) compels him to take Harry captive. Corlath does not understand what purpose Harry will serve, but commands his people to treat her as an honored guest. Harry soon adjusts to life with the Damarians. She learns their language and customs and begins to train as a warrior, during which time her latent kelar begins to emerge. After demonstrating her horseback riding and combat skills in a tournament, she is made one of the King's Riders. Corlath also presents her with the blue sword that had once belonged to the legendary Damarian heroine Lady Aerin.
As the Northern invasion approaches, Harry feels torn between loyalty to Homeland and her new-found love for Damar. She must defy Corlath and use all her skills—including the power of her own kelar—to bring Homelanders and Damarians together to defeat the Northerners.