▁of ▁the ▁kingdom s ▁of ▁Cast ile ▁and ▁León , ▁and ▁of ▁the ▁ab bey ▁of ▁Saint - G illes ▁in ▁southern ▁France , ▁the ▁rich est ▁pri ory ▁of ▁the ▁order . ▁He ▁supported ▁Peter ▁IV ▁against ▁the ▁Union ▁of ▁Arag on ▁and ▁fought ▁on ▁his ▁side ▁in ▁the ▁successful ▁Battle ▁of ▁Ep ila ▁( 1 3 4 8 ). ▁▁ ▁In ▁ 1 3 4 6 , ▁with ▁the ▁king ▁of ▁Arag on ' s ▁support , ▁he ▁gained ▁the ▁cast ell any ▁of ▁A mp osta ▁( which ▁was ▁the ▁pri ory ▁of ▁Arag on ). ▁Her edia ▁made ▁himself ▁and ▁his ▁family ▁( and ▁il leg it imate ▁children ) ▁enorm ously ▁wealth y ▁at ▁the ▁exp ense ▁of ▁the ▁order . ▁His ▁power ▁and ▁influence ▁was ▁greatly ▁circ ums cribed ▁by ▁the ▁Grand ▁Master ▁Raymond ▁Ber eng ar , ▁but ▁in ▁ 1 3 7 1 ▁he ▁entered ▁the ▁favour ▁of ▁Pope ▁Urban ▁V ▁and ▁was ▁elev ated ▁as ▁the ▁master ' s ▁lieutenant ▁in ▁Western ▁Europe . ▁ ▁Camp aign s ▁in ▁Greece ▁In ▁ 1 3 7 6 , ▁Her edia ▁conducted ▁the ▁fleet ▁bearing ▁Pope ▁Gregory ▁XI ▁back ▁to ▁Rome , ▁pres aging ▁the ▁end ▁of ▁the ▁Av ignon ▁Pap acy . ▁The ▁next ▁year , ▁on ▁September ▁ 2 4 , ▁Gregory ▁formally ▁appointed ▁Her edia ▁grand ▁master , ▁following ▁the ▁death ▁of ▁Robert ▁of ▁Ju illy ▁on ▁July ▁ 2 7 . ▁Her edia ▁emb ark ed ▁from ▁Nap les ▁for ▁Roman ia