Kama Sutra: A Tale of Love

Set in 16th century India, this movie depicts the story of two girls who were raised together, though they came from different social classes. Tara (Sarita Choudhury) is an upper-caste princess while Maya (Indira Varma) is her beautiful servant. The two girls are best friends, but an undercurrent of jealousy and resentment is caused by Tara's haughtiness, symbolized by the fact that Maya is given Tara's hand-me-down clothes and never anything new to wear. As the girls approach marriageable age, Tara resents that Maya is a better classical dancer than she is, and that her parents and hunchback brother, Prince Bikram (aka "Biki") show affection for her servant.
Tara is prepared to marry Prince Raj Singh (Naveen Andrews), and Maya is forced into the role of the inferior servant at their wedding festival. When the prince comes to view his future wife, he is instantly infatuated with Maya instead. Noticing this, Tara spits in Maya's face, sending her from the wedding in tears. Maya decides to take revenge when she chances on Raj sleeping alone, before he has completed the marriage rites with Tara. Maya has her first sexual experience with Raj, but unknown to both, Tara's brother, Prince "Biki", hides and watches the two of them together. Biki is crushed that his childhood infatuation has slept with his future brother-in-law, but at first keeps the knowledge to himself, and the wedding rites are completed the next day.
As Tara is leaving home as a newly-wedded bride to Raj, Maya tells her that just as Maya wore the princess's used clothes all her life, Tara will now have something Maya has used. During her wedding night, Tara, a sheltered virgin full of romantic dreams, is hesitant to consummate their relationship. This angers and sexually frustrates Raj, who rapes his horrified bride, setting a tone of violence and humiliation for the marriage. Despite this, Tara still yearns for a loving relationship with her indifferent husband.
To save Maya's honor, Biki sends a marriage proposal for her. When she refuses, he publicly brands her as a whore, and she is forced to leave her home. Wandering on her own, she meets a young stone sculptor, Jai Kumar (Ramon Tikaram) who works for Raj. He reveals that Maya has been the inspiration for his beautiful and highly erotic statues. Realizing she has nowhere to stay, Jai takes her to an older woman named Rasa Devi (Rekha), who is a teacher of the Kama Sutra, the ancient art of seduction and love making. Maya begins an intense romantic and sexual relationship with Jai that is abruptly halted when he fears he might not be able to work properly with Maya consuming his thoughts. Rejected by her first real lover, Maya finds comfort with Rasa Devi, making the decision to learn the courtesan's art.
Raj, now the king, recognizes the visage as Maya's in one of Jai's sculptures. He dispatches his attendants to find Maya and she is delivered to the King as his new courtesan. Soon after, Raj and Jai have a "friendly" wrestling competition, in which Jai wins. Jai gets the King's favor, but is also warned that there will be dire consequences if he should ever defeat the King again. Jai then learns of Maya's new status as the favored concubine. Jai understands that his king is a dangerous man and he must keep his former relationship with Maya a secret, for their mutual safety.
In the meantime, the threat of an invading Shah inches closer. As Raj descends deeper into opium addiction, sexual cruelty and debauchery, he becomes irresponsible with his duties as King. He insults Biki sexually and for being a hunchback. In retaliation, Biki writes a letter to the Shah to rid the kingdom of Raj, who now taxes the poor for his own perverted pleasure. Jai and Maya rekindle their passion and the two begin meeting in secret. As tensions between Jai and Raj grow, Maya and Jai exchange wedding vows in private. Raj later catches the two lovers together, and sentences Jai to death.
After finding Tara in the midst of a suicide attempt, Maya reconciles with her childhood friend. Maya then teaches Tara how to seduce the King, while Tara promises to help Maya escape to visit Jai. However, when Tara goes to her husband, he recognizes Maya's style of seduction and again tries to humiliate his wife. Finally free of her tormentor, Tara tells Raj that she doesn't even love him enough to hate him, and leaves.
Maya leaves the castle and visits Jai one last time. Telling Jai she is his forever, Maya hacks off her long hair, symbolizing that she will be his widow. Maya then tries her best to convince Raj to free Jai by promising him her total surrender. But knowing he can't have her heart, Raj rejects her plea. Just before the execution, a box arrives from the Shah, holding the severed head of the grand vizier Raj's brother. Jai is deliberately crushed to death by an elephant while Maya watches from the crowd. Meanwhile, soldiers of the invading Shah take the king's palace. Maya walks away into the distance, meditating on her new spiritual freedom: "My heart is as open as the sky."

Question: What is inching closer in the meantime?
Answer: the threat of an invading Shah