Electrical – Need help with electrical wiring for lights

electricalwiring

I disconnected my basement light wire by accident. In my spare room upstairs I had no light. I had this wall switch which controlled the receptacle instead. I decided to install a ceiling light using the same switch. I removed the receptacle and cut the wire not realizing that the wire was attached to the basement wire as well. Source wire was coming down from the ceiling which was attached to the basement wire as well as the receptacle. I pulled the source wire back up from the ceiling and installed the light using the switch loop configuration down below. Spare room light works great.

Now I have the basement wire sticking out of the receptacle hole. Below are the pictures. My question is how do I attach the basement light wire back to the same source? Should I install a junction box in the ceiling and throw a wire from the ceiling to extend the current basement wire?

enter image description here
enter image description here
enter image description here
enter image description here
enter image description here

Best Answer

Not sure you need a junction box at the light. What’s weird is it sounds like the switch controlled a receptacle and light in two different rooms on different floors? Are you wanting that switch to still control the basement light or are you wanting a different switch? Have you tried connecting the outlet back to see if it gets power?