You’ve probably heard it a thousand times. God’s number one command is to love Him with all your heart, soul, mind, and strength. But as Jesus says, the second greatest commandment is just like the first one: love your neighbor as yourself. God wants all people to be in healthy relationships, whether it’s with Him or with others.

But that’s easier said than done. Relationships are the most fulfilling and rewarding parts of life, but they’re also the most infuriating and heartbreaking. Whether it’s with a friend, spouse, co-worker, or child, when a relationship fractures, the effects can be devastating.

So how can you pray for a relationship when it seems like all hope is lost?

1. Ask God to Reveal the State of Your Heart

In a conflict, it’s not always clear who’s the victim and who’s the offender. Chances are, each person is a bit of both: as emotions spike and anger festers, so does passive-aggression and wounding words. So ask God to show you where you’ve been wrong. Maybe you don’t realize how much you’ve hurt the other person, or to what extent your heart has hardened toward him or her. If you ask the Holy Spirit to reveal these things to you, He will.

2. Ask God for Forgiveness

Once you know how you’ve contributed to the conflict, ask God to forgive you! He has infinite grace for us when we mess up. Then, if it’s appropriate, ask God to give you courage to ask for forgiveness from the other person. Saying “I’m sorry” is incredibly humbling, and so necessary for healing. Ask for strength and wisdom as you initiate an honest conversation with the person you’re in conflict with.

3. Ask God to Help You Forgive

Forgiving someone who has deeply hurt you is one of the hardest things you can ever do. The relationship may be too damaged to immediately restore what once was, but that doesn’t mean you can’t have forgiveness in your heart. You may never be close again, but you can wish the other person well. Pray that you would be able to put behind your selfishness, malice, and frustration, and that you would replace these things with humility, forgiveness, and love.

4. Thank God for the Other Person

All people are created in the image of God: even the person you’re frustrated with. Thank God for each of his or her strengths, personality quirks, and all the reasons why you loved him or her in the first place. Try and remember what your relationship was like before the conflict, and reflect on the fact that he or she is still the same person.

5. Ask God for a Miracle

Jesus is the restorer of all things. He can repair hearts that have been shattered beyond recognition, and He can work to bring about complete healing. No conflict is too deep, and no relationship is hopeless. Though rebuilding trust can take time, it’s not unattainable. Nothing is impossible with God.