Sentence:  It was the New Castle built upon Tyne to <WSD>gainstand</WSD> the Scots, who then and for some centuries afterwards sadly troubled these rough borderers, and in turn were sadly troubled by them. 
Meaning of the word marked with <WSD> tags:  To stand against; resist, oppose; withstand.