Relay stops working properly after connecting battery to relay

Hey, I'm building an automated gardening system as a small project and I ran into a problem with connecting a mini pump(Voltage: 2.5-6V) to Arduino. I have DHT11, water level sensor, soil humidity sensor, and mini pump (connected to relay). Without a connected battery, the relay works as I intended to (2 seconds on, 5 seconds off if humidity < 30% (video1)). As soon as I connect the 9V battery relay starts getting false signals and starts turning off/on randomly (video2). Do you have any idea what causes this?

Relay working as it should(video1): Imgur: The magic of the Internet
Relay not working properly(video2): Imgur: The magic of the Internet

Thanks

what type of 9V battery?

these are no go for anything requiring more than a trickle of current

It's 9V alkaline 6F22

probably not enough current

voltage drops quickly when you draw 250mA... and I assume your pump draws more...

Thanks for the help, I will try with a different battery. Any suggestions on which one should I pick?

LiPos would be able to provide more current

if you don't read French, I suggest you google translate this article by @hbachetti RitonDuino: Alimenter un ARDUINO sur Pile ou Batterie

➜ Google translate in english

If you have no Lipo experience, you need to research proper Lipo handling and use
protocols. One mistake and it could burst into flames.

fair point, always be careful with LiPo