One can have an entire nation behind his agenda, and even other nations in his support, and that still does not make his deeds righteous. History testifies such events.On another note, one can have the entire world against him, and his closest relative seemingly turning his back on him, that still does not make his deed unrighteous. The Good News of Jesus Christ testifies such event.
“I the Lord search the heart and examine the mind,to reward each person according to their conduct, according to what their deeds deserve.” Like a partridge that hatches eggs it did not lay are those who gain riches by unjust means. When their lives are half gone, their riches will desert them,and in the end they will prove to be fools.(Jeremiah 17:10-11)
Trust in the Lord with all your heart,
And lean not on your own understanding; In all your ways acknowledge Him, And He shall direct your paths. (Proverbs 3:5-6)