How do I remove this handguard?

I’ve been on a quest to find a gray flat top upper receiver to go with my gray M16A1 lower. I have not had any luck, so I’ve decided to use the gray Eagle Arms upper receiver that I purchased for a target AR15 that I had built in the mid '90’s. Unfortunately, the method of removing the handguard is not obvious. My assumption was that the handguard was simply threaded into the barrel nut, which it may be. However, no amount of twisting will cut it loose. BTW, the scope is remove and the upper/lowers separated. The upper is now sits in a upper receiver vice block in my vice. Suggestions?

Try heating with a hairdryer at the nut and use a strap wrench.

Might take more heat than a hairdryer. Try to concentrate the heat in this area. If you have to use a small torch I would de-grease everything to avoid cooking the oil.

OK, so I am correct that it’s threaded on. Is it likely that they put Loctite on the threads? I’ll have to borrow a strap wrench.

Direct flame applied to aluminum (torch) can cause imbrittlement.
If the rail is to be trashed, not an issue. Otherwise use a heat gun if hair dryer isn’t sufficient- if you want to salvage the rail.
And yes, I’d assume thread locker was used on install.

This style of rail is essentially a hollow sleeve that threads onto a barrel nut. There doesn’t appear to be a jam nut, so it should come off fairly easy. The question is did someone apply something to the threads to secure it. You need to find a solid method of securing the upper and then a solid strap wrench around the tube. If it doesn’t move I would then assume something is on the threads.

These tubes also tend to loosen the barrel nut and bend the gas tube.

…after removing the gas tube of course.

The gas block is held in place with set screws. Hopefully, I’ll be able to get those loose and move it forward to remove the gas tube.

Or, remove the gas tube pin and remove the tube with the block in place if you can’t get to the block.

I purchased a 12" Titan Tools strap wrench off Amazon.

I was able to use it to remove the handguard.

As you can see (please ignore my messy workbench), they indeed used some sort of adhesive liquid to keep the handguard in place. The barrel nut did twist a bit when I was rotating the handguard off, so the gas tube bent. No big deal. I have it off and will now start building an upper for my M16A1. BTW, the set screws on the gas block came off easily. The gas block did need a bit of motivation, but it came off without much trouble. Thanks everyone for your advice.