The Keys of the Kingdom

Father Francis Chisholm (Gregory Peck) is visited in his old age by Monsignor Sleeth (Sir Cedric Hardwicke) at his parish in Tweedside. The Monsignor informs Father Francis that the Bishop thinks it would be better if he retires, as Father Francis' somewhat unorthodox recent teachings have become a distraction. The Monsignor retires to his room in the rectory, and finds Father Francis' diary that recounts his story from 1878. As the Monsignor begins to read the diary, a flashback begins.
One night during his childhood, Francis' father was beaten by an anti-Catholic mob during a rainstorm. As his mother attempts to lead her husband to safety, they both die in a bridge collapse, leaving young Francis an orphan. He is raised by his aunt, and the next we see of Francis, he is leaving for the seminary with his childhood friend, Anselm "Angus" Mealey (Vincent Price). Francis studies at seminary for a year, but is unsure about all of the Church's teachings. He still finds himself in love with Nora, a girl from his home. However, he finds out that after he left, Nora had a child out of wedlock with another man, and she dies before Francis can return to see her. This prompts him to go back to seminary and follow through with his studies, and Francis becomes a priest.
Francis' first two assignments as a priest are unfulfilling to him, so the Bishop asks Francis to be a volunteer missionary to China. Francis readily accepts the position, even though that means it would take him far from home as well as far from Judy, Nora's daughter. Francis arrives in Paitan, Chekhow Province in China to find the mission destroyed by floods, and not rebuilt because the true Christians all left, leaving only those who attended to receive free rice. Because the Church hadn't given the mission money for rice in over a year, "the faith left them when the rice gave out." Francis rents a small room in the city to evangelize, but because he has no money or influence, he is attacked by those same "rice Christians" who were supposed to help him.
A young pilgrim named Joseph (Benson Fong) finds Francis in town,] and restores his faith in his mission by offering to help rebuild the church out of Christian duty and not for money. Francis then receives medical supplies from his childhood friend Dr. Willie Tulloch (Thomas Mitchell), which allows Francis to offer services to the sick. Francis is summoned to the home of local official, Mr. Chia (Leonard Strong), to heal Chia's only son of his infection. Joseph is apprehensive because if Chia's son dies, Francis will be in danger, but Francis goes anyway. He saves the boy, but Chia and his household are ungrateful because Francis' methods and faith were so contrary to the local tradition. A few weeks later, Chia comes to Francis in order to convert to Christianity, but Francis rejects him because he would not be converting for the proper reasons. Instead, Chia thanks Francis by giving the mission many acres of land and all of Chia's workers in order to build a thriving mission.
Two years later, the buildings are almost done, but the nuns arrive a day earlier than planned and Francis is disheveled when they show up. Francis' relationship with the Reverend Mother Maria-Veronica (Rose Stradner) is tense, but they put aside personal differences when the town is the scene of a battle between republic and imperial troops. Willie visits from Scotland and is able to create a makeshift hospital, but the church is destroyed in a fire set by imperial troops. Willie is then shot, and eventually dies. The imperial general then gives Francis a choice: either all food and money from the mission are given to the general or the mission and everyone inside of it is destroyed. Joseph and Francis come up with a plan to sabotage the imperial troops, and Francis is forced to leave his impartiality and blows up the imperial troops.
Later, Angus arrives -- now a Monsignor -- as he is making a review of world missionary sites. He tells Francis that the Church cannot pay for the rebuilding of the mission, and that Francis has the lowest conversion rates in the world. Angus implores Francis to convert rich Chinese and live in luxury in order to impress the locals, but Francis refuses. Meanwhile, the Reverend Mother apologizes for her "shameful" behavior towards Francis and begs for forgiveness, which she receives.
Ten years pass, and Francis' mission is flourishing, and the area is peaceful. The Reverend Mother tells Francis that American Methodists are building a mission inside town, and Francis goes to visit them. Francis becomes friends with the Methodist missionaries, and peace continues. More years pass, and as Francis prepares to depart China, he learns that Angus is now Bishop.
The flashback ends, and Monsignor Sleeth admits to Francis that he read the diary. Francis is flattered, and Sleeth tells Francis that he won't tell the Bishop anything is amiss at Francis' parish, leaving Francis be as he spends his remaining time doing what he loves doing: serving a parish.

Question: who was the battle with?
Answer: the republic and imperial troops.